- Joined
- Feb 6, 2016
- Messages
- 2
- Reaction score
- 0
- Points
- 1
I have the following terminal command that I want to automate using applescript. After cd to the folder that holds the .pdf files. This code looks at the first letter of the file name and based on that sorts the files into the alphabet folder corresponding to the first letter of the file.
do script "cd ~/desktop/test1; for x in ls -1 | sed -e 's/^\(.\).*/\1/' | sort -u; do mv -i ${x}?* $x done"
Not sure how to get this to work. It will not run in applescript. Any insight is appreciated.
Thanks
do script "cd ~/desktop/test1; for x in ls -1 | sed -e 's/^\(.\).*/\1/' | sort -u; do mv -i ${x}?* $x done"
Not sure how to get this to work. It will not run in applescript. Any insight is appreciated.
Thanks