Help with sendkeys automated process
Posted on 2004-10-01
This is what needs to be done on a daily basis :
1) Copy X file to Y directory.
2) Compare X file in both directories.
3) Delete original file
Yes, a simple enough task to be done manually. Yet I am trying to automate it with the use of sendkeys.
I have two problems as of now.
This is currently what I have :
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "copy \\path\path\path\current\*.zip \\path\path\path\Archive\
WshShell.SendKeys "fc \\path\path\path\current\*.zip \\path\path\path\Archive\
--- Here is my problem.
The name of the file changes everday ... example : name.1.20041001200005.
Thus, I can not do a fc to compare ...
After completing a file compare successfully. I will have the outputted compare.txt sent locally and opened. Ensure that there are no differences, and delete the original.
My question is, how do I tell sendkeys, that once I close the notepad, to continue with the script - to delete the original file?
I know an easy solution would be to just simply create a new temporary directory, but I'd like to see if there is any other way.
Any help is much appreciated.