Hello everybody,
first congrats for the great site.
I’m new to Applescript but I’m quickly trying to give a sense to it.
I’m kind off stuck with task that maybe, you guys, can helping me with it and , I bet, it’s really simple for you ![]()
I need to create a simple application that let me get somes info from a file, a series of files, and assign these to same variables.
To be more clear, here an example.:
Assuming that we have a folder with, for example, 10 files call “test.0001.jpeg” to “test.0010.jpeg”.
I need to be able to drag the folder or one of those files over my Applescript app., drop it and get:
-name of the files without numbers or extension, in this case “test”, and set this to a variable.
-even get other info, like user, date of creation, etc, and set those to other variables.
-get a count of the number of files in the folders, in this case 10 , and set this to a variable in the form of “1-10”.
Hopefully I’ve been clear.
Thks a lot for your time.
Cheers
Further, to see what is available quite easily from a sample file, run these scripts from your Script Editor, and then be more specific about what you want to know. In each case, look at the Results pane of your Script Editor window to see what you got.
Script 1
set FileSample to choose file
set InfoF to (info for FileSample)
Script 2
set FileSample to choose file
set InfoS to (do shell script "mdls " & quoted form of POSIX path of FileSample)
Great!
Thks guys for the fast response. I’ll take a look.
Thks again