I need to create an automation to make a new folder named by my selected text and then make that folder the new default Safari downloads folder. This would be the default folder when I click on a download file link from a webpage until I run the script again for a new selection.
edit: this may seem trivial but I have to click a URL to download 5-8 .pdf files (I have to click on each file separately) per order for about 30 orders a day and I have to make a folder named by the the order number to put the files in. I have done a lot of research and I'm not sure if this is something that can be done with AppleScript or if it also requires Shell script and is something I will have to pay for to be developed. I did post a freelancer post hoping someone could code it but I'm looking for an easier solution from someone smart in these boards. thank you so much for any help or guidance.
Best Answer
Open Automator and create a new service:
Choose: Service receives selected text in Safari like in the screenshot below.
Then add an item Run AppleScript with the content:
Save the service as Create Folder from Text.
Then in Safari choose some text and right-click it -> Services -> Create Folder from Text.
If the destination folder already contains a folder with the same name the service fails without any further notice.
If you don't like the dialog "—Create folder from ..." add a
#
in front of it or remove the two lines.If you replace:
by
the Automator service will open the new folder and ask you to choose the new folder as new download folder. Simply hit Choose. If you then right-click the download link -> Download linked file as…, the file will be downloaded to the new folder.
The script may be improved further, because I didn't get it to work to set the new folder as new download destination automatically.