rshell and wildcards
-
- Posts: 22
- Joined: Wed Jan 13, 2021 6:08 pm
- Location: Northern Florida
rshell and wildcards
I'm starting to use rshell after amp stopped working for some reason. I was using powershell scripts to copy the files via ampy but now am converting those scripts for rshell. My issue is that when I use a wildcard (*.py). If I use "cp *.py /pyboard/" I get "File....boot.py does'nt exist" for the source file. If I use "cp boot.py /pyboard/" it copies fine, as it does for each individual file. My unix experience is not as strong as my Windows.
Re: rshell and wildcards
What happens if you put the part with the wild card in quotes: "*.py"?.
-
- Posts: 22
- Joined: Wed Jan 13, 2021 6:08 pm
- Location: Northern Florida
Re: rshell and wildcards
Code: Select all
cp "*.py" /pyboard/
I'm wondering if the long path is causing a problem. The full path is "/Users/MyUserName/OneDrive - mycompanyname, Inc/Development/Automation/Python Projects/ThisProject". I am not specifying the full path in the wildcard but I'm also not specifying it when I name the specific file. I'm running rshell by opening a prompt via the Shift-Right Click > open command window here, so rshell runs from the current directory.
Okay, so after typing that last paragraph, decided to test that idea.
This does not work if I'm running rshell from the current directory:
Code: Select all
cp "*.py" /pyboard/
Code: Select all
cp "/Users/MyUserName/OneDrive - mycompanyname, Inc/Development/Automation/Python Projects/This Project/*.py" /pyboard/
Re: rshell and wildcards
That seems odd, but I'm glad you have something working. I don't love folders or filenames with spaces and commas, but if you are in the current folder, that shouldn't be an issue. I wonder if onedrive is doing something in the background to make the cloud folder appear local. But then why would the full path solve the issue. I don't know.