enter dates to terminal command.

i have just been introduced to applescripts and how useful it is w/ the unix terminal. man! this is great.

i update my database every now and again. i use 3 unix commands to invoke a perl script someone helped me make. one command i will show as an example:

perl mac2pc.pl 05182004/05182004.txt > 05182004/05182004pcd.txt

“05182004/05182004.txt” is the folder/text perl uses to massage the data. i always name it after the date of the update. so folder 05182004 has a file 05182204.txt in it. perl manipulates the data and renames the new text file “05182004pcd.txt”

no the only part that slows me down is inputing the dates. is there a way i can just plug in the date (ei.: 05212004) and have the applescript change the date to whatever i tell it to do so i don’t have to cut/paste the dates of folder/text?

so…, before i activate the script, i plug in the date somewhere, and applescript modifies the commands to reflect the date desired.

You mean like this?

set ThisDate to display dialog “Which date?” default answer “Date”
set ThisDate to text returned of ThisDate as string
do shell script “perl mac2pc.pl” & ThisDate & “/” & ThisDate & ".txt > " & ThisDate & “/” & ThisDate & “pcd.txt”

Or have I completely misunderstood?