[Automation - TDA 3.1] Run Program - Batch File Issue

I’ve talked about this before, but never really got an answer, unfortunately it’s cropped up again.

Summary: It appears that when certain commands are included in a Batch file that is being executed with the “Run Program” activity, those commands are not actually being executed. When the batch file is executed manually from the command line, it works just fine.

Detail: I’ve got a very simple, one-line batch file that uses the windows XCOPY command to move a file from one network path to another:

XCOPY “\SERVERNAME\PATH\TO\FILE\TEST.XLSX” “\SERVERNAME\SHARE\POINT” /I

When running the automation script, I see the command window briefly pop open and then close, and according to the log, the command was executed.

But if I go to the remote directory - no file.

However, if I run the batch file from the command line manually, it works just fine and copies the file and creates directory(s) as needed.

Any thoughts? I haven’t tried this in TDP 3.3 beta yet, because I cannot roll beta out to production, and this is an urgent requirement from my client.

Are you using Task Scheduler to kick off the Toad Automation Script? Assuming you are running Windows 7 and you are using the Task Scheduler have you tried just adding another action to the task to kick off the .bat file?
TS.png

Hi Dave,

No, it’s still a Windows XP machine for the moment.

I’ve actually thought about doing what you’ve said as a separate scheduled task, but I see some inherent issues with it - namely if the automation takes longer than I anticipate, or fails completely for one reason or another, when the task for the batch file executes, it’ll copy the old file, not the newer one.

This presents an issue because there’s not necessarily any feedback to me, and this report is rather critical to one of our customer service groups.

In TDP 3.3 this is supposed to no longer be an issue because the Copy File activity is supposed to properly support the use of variables in the path & file names, but until it’s out of beta I can’t deploy it to our production environment.