[X4U] Decent book on scripting language
Daly Jessup
jessup at san.rr.com
Fri May 23 04:35:08 PDT 2008
Ed Gould asked:
>Can someone suggest a scripting language that will be able to test
>easily if a file exists and *move* files from foldera to folderb (or
>"c" or "d" or "e" etc)
>
>At first a friend suggested automater but he looked at it and said
>he didn't think so.
>
>I would like to be able to use (what I call symbolics or someone
>might call a variable) eg: move &1stchartest.pdf to
>folder&1stchat\&1stchartest.pdf
>this would (if 1st char was say a) move atest.pdf folder\atest.pdf
>I know the example is not clear but the scripting language needs to
>be able to actually move files and be able to have variable names
>used in the file move as well as destinations.
>
>The languages I know this is extremely simple so I am guessing there
>is one for Apple as well.
>
>Is there one, if so what is a decent book on it?
It seems to me that this could be done with a shell script in Unix. I
don't know what would be a good book on Unix shell scripting, but
I'll bet that a trip to the bookstore would let you find one that you
like.
Then in Automator there is an Action in the Automator Library to "Run
shell script" so once you had the shell script, you could add it as
an Automator workflow to the Finder's contextual menu.
Another option might be to use Perl. It says at this page that it is
built in to OS X. I didn't know that. And this article suggests using
BBEdit to do your scripting.
<http://www.mactech.com/articles/mactech/Vol.18/18.09/PerlforMacOSX/index.html>
Daly
----------------------
More information about the X4U
mailing list