My "objective" is to run a sql query, to save the file on a local drive and then to copy the file to a network location automatically. The code works when I execute it but when I schedule it, using Norton Scheduler or NT's At command, I get a file not found error.
This is the body of what I'm doing...
________________________
AppActivate "ISQL/w"
SendKeys "%{F}"
SendKeys "{A}"
SendKeys "RMA_INFO.TXT", True
SendKeys "{ENTER}", True
SendKeys "{Y}", True
SendKeys "%{F}"
SendKeys "{X}", True
SendKeys "{Y}"
SendKeys "{ENTER}", True
Kill "\\servername\tdrive\service\rma_info.txt"
Call Copy_File
________________________
The Copy_File function is where shfileoperation comes in. the code is taken directly from kb Q151799 and copies from a local to a network drive.
I believe the file not found error comes at the Kill statement, but only when scheduled. When I run the executable, it works.
Any suggestions?
Regards,
Deb
