Some times i get error “Finder is busy”, because my scripts are using Finder same time. I would like to replace some of my Finder related commands with unix commands. Especially copy/rename/create new folder/open/size of file/delete commands.
Hi cirno,
of course you can do this.
Here is a collection of basic UNIX commands: http://mally.stanford.edu/~sr/computing/basic-unix.html
This example script moves a file “test.txt” from movies folder to pictures folder of the current user
set sourceFolder to path to movies folder as Unicode text
set destinationFolder to path to pictures folder as Unicode text
set fileName to "test.txt"
set shellCommand to "mv " & quoted form of POSIX path of (sourceFolder & fileName) & space & quoted form of POSIX path of (destinationFolder & fileName)
do shell script shellCommand