How to use a folders name in an apple script?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

How to use a folders name in an apple script? Tue Aug 08, 2017 5:10 pm • by nebaon
I would like Hazel to download images that have corresponding names to the names of the folders in the monitored folder.
I have a script that should do the job (see below).

The problem is how to alter theFile so it will just contain the folder name without any path or included it.

Code: Select all
set theURL to theFile
do shell script "cd ~/Desktop/Hazel\\ test\\ folder/images; curl -O 'http://somedomain.com/" & theURL & ".jpg'"


I hope somebody can help?

Best,
David
nebaon
 
Posts: 6
Joined: Tue Jan 19, 2016 6:55 am

Since this is a more general AppleScript question, you are probably better off doing a google search on it as there are various resources on the net.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support