afordturtle Posted July 4, 2020 Posted July 4, 2020 Hi. I'm looking to create an Alfred workflow that copies a template folder from its location in Dropbox to my Desktop. The folder path to be copied is follows: /Users/aaronriddle/Dropbox (Personal)/Aaron Riddle Photography/Video/Virginia Elope Video Template I want to copy it to my Desktop path as follows: /Users/aaronriddle/Desktop I tried doing this via terminal using the below script: cp -a /Users/aaronriddle/Dropbox (Personal)/Aaron Riddle Photography/Video/Virginia Elope Video Template. /Users/aaronriddle/Desktop/ However, it gives me the following error: zsh: no matches found: (Personal)/Aaron Can someone point out what is wrong with the terminal script, OR suggest if there is a better way to do this? Thank you for your help!
vitor Posted July 4, 2020 Posted July 4, 2020 2 hours ago, afordturtle said: Can someone point out what is wrong with the terminal script When you do cp -a /Users/, the shell knows that cp, -a, and /Users are different arguments because they have spaces between them. So how is the shell supposed to know that Dropbox (Personal) is part of the same argument, and not Dropbox and (Personal)? The answer is quoting: cp -a '/Users/aaronriddle/Dropbox (Personal)/Aaron Riddle Photography/Video/Virginia Elope Video Template' '/Users/aaronriddle/Desktop/' afordturtle 1
afordturtle Posted July 4, 2020 Author Posted July 4, 2020 @vitor - awesome! Thank you and works like a charm.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now