I hope this is a simple answer and I appreciated any assistance I can get. I’m trying to move a folder called data located in the user’s home folder. I need to move this to the employee’s OneDrive folder.
As a test, I can get the following to work (this will move the data folder to the Desktop):
set userName to short user name of (system info)
do shell script “mv /users/” & quoted form of userName & “/data /users/” & quoted form of userName & “/Desktop”
When I change Desktop in the above line to the path of the OneDrive folder (OneDrive - mycorp), it looks like this:
set userName to short user name of (system info)
do shell script “mv /users/” & quoted form of userName & “/data /users/” & quoted form of userName & “/OneDrive - mycorp”
I get the following error message saying
error “usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source … directory” number 64
I think the problem I’m having has to do with the spaces and the dash that are part of the OneDrive folder name. This name is created by default so I can’t change it.
Thanks, everyone.