On Sep 11, 2012, at 04:43, Bert Groeneveld <email@hidden> wrote:
tell application "Finder" move all_foundImageNames to the_CLEANSTART_folder end tell
Hi, can someone help to rewrite above simple Finder tell statement with "do shell script"?
______________________________________________________________________
Hey Bert,
Look at the man pages for 'cp' and mv' and perhaps 'ditto' and 'rsync'.
A really simple test case:
set _src to "~/test_directory/test_mv/*" set _dest to "~/Desktop/Desktop_Destination_Folder/"
do shell script "mv " & _src & " " & _dest
You have to convert Mac paths to posix paths and either escape spaces or quote them properly.
set _path to alias "Ryoko:Users:chris:Documents:Apple Hardware Information:" set posixPath to POSIX path of _path set _src to (quoted form of posixPath) & "*" set _dest to "~/Desktop/Desktop_Destination_Folder/"
do shell script "mv " & _src & " " & _dest
Tilde (~) designates the current-user's home folder.
The '*' means all items in the designated path.
Be sure you play around with disposable test files.
Maybe do some reading on the Internet about 'mv' and 'cp'.
If you have problems be sure to state enough of the particulars, so we can help.
-- Best Regards, Chris
|