Skip to main content
Inspiring
March 22, 2021
Answered

Run script automatically when file is in hotfolder

  • March 22, 2021
  • 6 replies
  • 2112 views

I created a scritp that saves file from the input folder as a pdf in the output folder. Is it possible to run the script automatically when the file appears in the input folder?

Thanks in advance!

This topic has been closed for replies.
Correct answer Charu Rajput

Hello @milevic 

Following link has a script which do similar to the what is your requirement but this is for the photoshop. You can try it by changing required things.

 

https://community.adobe.com/t5/photoshop/automatically-run-scripts-on-files-in-a-specific-folder/td-p/8863088 

 

I hope this will give you idea to start.

NOTE: I haven't tested myself.

6 replies

Charu Rajput
Community Expert
Charu RajputCommunity ExpertCorrect answer
Community Expert
March 24, 2021

Hello @milevic 

Following link has a script which do similar to the what is your requirement but this is for the photoshop. You can try it by changing required things.

 

https://community.adobe.com/t5/photoshop/automatically-run-scripts-on-files-in-a-specific-folder/td-p/8863088 

 

I hope this will give you idea to start.

NOTE: I haven't tested myself.

Best regards
milevicAuthor
Inspiring
March 23, 2021

I will try to be more precise. 

The AI is installed on the server computer (MAC), the script I created automatically opens all the files from the input folder, converts them and saves them to a specific location, and that works perfectly when i access script manualy.  My problem is that I don't know how to trigger the script every time a file arrives in the input folder. An additional limitation is that due to the company's policy I cannot install  any additional software.

 

Thank you all for your dedication. 

Larry G. Schneider
Community Expert
Community Expert
March 24, 2021

One thing. AI is not allowed to be installed in a server environment. Installation is for single user only. Please read the license carefully.

itsBenMason
Inspiring
March 23, 2021

I achieved something like this by using a custom Adobe Bridge script that listened for folder changes, if a file of a certain format was found it ran a script and then moved the file to a completed folder. Worked well for what i required.  If you're familiar with scripting, it maybe a good option.

 

Believe this maybe the post or similar that i  used to learn it

https://community.adobe.com/t5/photoshop/watch-folder/m-p/4574941

rcraighead
Legend
March 22, 2021

If you're on Mac "Keyboard Maestro" is another way to setup "Watched Folders" and much more.

Disposition_Dev
Legend
March 22, 2021

you'll likely need to do some combination of automator and applescript (or the pc equivalent which i'm not familiar with).

 

I'm not entirely sure how you'd trigger the script. you could set up an action in illustrator that executes the script, and you could set a hotkey to that action, and you could use automator or applescript i believe to send some keystrokes to illustrator to trigger the action.

 

And as AndrewH said, you can attach "Folder Actions" to your hot folder so that when a new file is added, the folder action will execute and trigger your applescript which triggers your action which triggers your script.

 

If there's a less convoluted way to do this, i'd love to hear about it. Because honestly all of that is a bit ridiculous.

andrewh92075852
Known Participant
March 22, 2021

You can create watch folders in various ways on Mac and Windows. On Mac I think I used Automator. "Mac Automator watch folder" should bring up plenty of options/ideas. On Windows I think I did it via Powershell/the terminal.