Automap: Moving Jobs folder

Moving the Automap Jobs folder can be troublesome because the Automap GUI

To move the Automap Jobs folder to a new location:

  1. Use Windows to move the folder to the new location. For example, from C:\Automap\Jobs to C:\srccontrol\Automap\Jobs.
  2. Open the Automap GUI and choose Edit -> Preferences. Change the location of the Job folder to the new location.

  3. Close the Automap GUI.
  4. Open the Windows task scheduler and delete all tasks whose name begins with "waj ". If you are not familiar with the scheduler, do an Internet search on "windows task scheduler". You can run the Task Scheduler from the Administrative Tools control panel.

IMPORTANT: If the new directory is on the same disk (such as C:), AND if is the same depth as the original Jobs directory (such as 2 deep in \Automap\Jobs), you can now run the jobs. The Automap GUI will prompt for the account password when creating the new Windows tasks for the job.

Otherwise, the drive is different and or the path depth is different, edit each .waj job and correct the paths. When Automap creates a .waj, it uses relative paths, so each path name tends to begin with something like "..\..\..\directory\filename.ext". At a minimum, the location of the stationary and source document will have to be updated.

<Project path="..\..\..\templates\webworks\Reverb_stationary\Reverb_stationary.wxsp" />
<Document path="..\..\..\workspace\doc_main_branch\internal\webworks\" />

There are various ways to edit the jobs:

I like the sed method. I used this batch file to identify each .waj and the run it through Gnu sed (free download).

rem Update all Automap jobs using the script.
FOR /D %%p In ("C:\srccontrol\Automap\Jobs\*.") DO c:\Utilities\GnuWin32\bin\sed.exe --in-place=* -f C:\srccontrol\Automap\updateAutomapJob.txt "%%p\%%~np.waj"

rem Delete sed temp files that get left around.
del /q C:\srccontrol\Automap\sed*.

And the updateAutomapJob.txt file has this substitution:

# Update Automap job paths to replace all "..\..\.." with "c:\directory".

IMPORTANT: The <project path=""> must be either relative (e.g., "..\..\..", or include the drive letter (e.g., "c:\directory\..."). Otherwise the Automap GUI Target Configuration tab is greyed out and unavailable.

HelpCenter/Tips/Automap: Moving Jobs folder (last edited 2014-10-09 21:27:30 by MikeHedblom)