Scan Directory For File Creation w/ Random File Name

Bruce (2 posts)
September 1, 2009 05:28 PM
Accepted Answer

Folks,

  This seems like a very simple thing, but I am having difficulty getting it to work.

  A user is creating new files on a remote server (accessible either via mapped drived or unc naming) but is not forwarding a copy of the file to us.

  At a minimum,  I want to set up an adTempus job to simply scan the directory on a remote server (accessible either via mapped drived or unc naming) and trigger an e-mail whenever a new file is created in the remote directory.

  Ideally, I would then build upon that job with the scripting necessary to push a copy of the file onto another server using a new file name.

  Can anyone share a working example?

Thanks

Bruce

Bill Staff (599 posts)
September 1, 2009 06:15 PM
Accepted Answer

What sort of difficulty are you having?

You can use a File Trigger with the UNC path and a wildcard (like "*.*") to trigger when files are created. You cannot used the mapped drive letter; see here for additional limitations.

When the job runs, the name of the file that triggered it will be available in the "FileName" job variable, which you can use in a script or pass to a batch file to do the copy. E.g., to send the name to a batch file, put "%FileName%" in the command-line parameters box of the step that runs it.

You can also insert "%FileName%" into the notification message subject or body to include the file name there.

 


Bruce (2 posts)
September 2, 2009 07:21 AM
Accepted Answer

Bill,

  I am using the UNC path and when I force the job to run, it does scan for a new/modified file (wild card for *.txt).     However, I cannot seem to get the job to trigger based on a file creation/modification - I have to run it manually

Bruce

Bill Staff (599 posts)
September 2, 2009 09:22 AM
Accepted Answer
Please submit a support request so we can look at this in more detail.

Replies are disabled for this topic.