I’m new to Automator, so any help will be appreciated
I’m using 10.4.11 now, but my department is looking at getting 10.6 in a few months.
I created an Automator workflow that will rename any file to be more web friendly. It renames any file dropped on it, then places it into another folder. I turned the workflow into a folder action that is attached to a folder on a shared file server. The server is not a Mac. There are 20+ computers that share this server and use this active folder. It works no matter what computer “drags and drops” files onto it. Great.
Here are the issues I’m having a problem with and want to know if there’s a better way:
I’m guessing that Automator’s actions for this folder action are local to my computer. The folder acts super fast on my machine. Other computers experience a 20-30 second lag before they see the new “renamed” file show up in the folder. I’m again guessing that: other computers need to talk to the server, which then talks to my machine (for the script), which talks back to the server, which then has to report back to the other computer.
Everytime someone uses the folder, my computer takes 1/2 second to run the script. It will change my computer’s focus, so if I’m in the middle of working on a large Photoshop selection, it messes me up.
My computer needs to be on in order for the folder to work.
And finally, but probably most important is that every time I restart my computer, the folder actions stop working. Looking at the “configure folder actions” menu, it still shows that they exist and are clicked. The folder actions are still enabled. I have to attach the folder action again before it works.
Is there a better way to do this in Automator, or is there other software that can manage active folders on a file server?
Model: Power PC G5
AppleScript: 1.10.7
Browser: Firefox 3.5.5
Operating System: Mac OS X (10.4)
That lag will be something that everyone will have to deal with unless you find a way for your server to do the heavy lifting instead of your Mac. What is your OS? If it is a Windows based OS then a simple batch script should be able to do everything you want, as well as clear up your current issues. The copy or move command should work. Though the For Files command (which you will have to download) is a little more powerful.
There are two ways to run your script. You can code the script with a loop, OR, set your OS to run the script at certain times of the day with Windows Task Scheduler (read about how to set it up on XP here http://support.microsoft.com/kb/308569). The problem with setting it up to run with a loop it using a GOTO command, goto’s tend to make the script sloppy but they work. Running it with the Task Scheduler means that it will only be ran at certain times of the day.
Your batch script would look something like this:
I don’t know how well you know batch scripting so I will explain each step of the script.
@echo off Tells the script to not display every step of the script as it happens. This is mearly a cosmetic command.
:: Allows you to comment in your script.
set Lets you set variables, the form is set variable=“String”. Variable is what you want to name your variable and “String” is what you want you variable to equal. Quotes are only necessary when the string you want has spaces. You can also set variable=%previously_defined_variable%
: By itself allows you to set a lable.
cd Will change your directory. Since earlier in the script you set locationfrom to C:\Folder when you type cd %locationfrom% it will return cd c:\Folder
move Will move any file to any location within reason ;-).
* Is wildcard. “*.jpg” would return all files with the jpg extension regardless of the file name.
goto Finally, the goto command. This will direct the script back to the label you set earlier. e.g. “goto pie” will send you back to the part of the script “:pie”
Hope this helps. If you have any questions let me know and I will do my best to help you out.