Now, I need to copy the file back to the local pc. Because I am on remote desktop, my thought was to bring up the start menu, click on the Command Prompt entry, send text to the command window to copy the file back to the local server. Easy peasy.
Not.
The portion of my script to open the command prompt, execute the copy command, exit the prompt is below:
Code: Select all
SetFocus>SWUniversity4*
Press CTRL
Press Esc
Release Esc
Release CTRL
Wait>1
Press Down *2
Wait>2
Press Enter
Wait>3
Let>SK_DELAY=10
SendText>copy /Y Documents\rptStudentSchedule.txt \\tsclient\C\DiamondD_Robots\Reports\
Wait>1
Press Enter
Wait>10
SendText>exit
Press Enter
^Escape pulls up the start menu. Down twice highlights the Command Prompt entry. The Command window pops up nicely, thank you very much. BUT....when I run the script, either from debug mode or not, my copy command results in the following:
Yikes! And, the kicker is, I can step through the script beginning at the SendText to send the copy command, and it works just fine! I've tried lengthening the wait time between script lines, and the delay time in sending the characters. No luck.Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Sandy.Doss>
C:\Users\Sandy.Doss>^O^P^Y ^Y ^D^O
C:\Users\Sandy.Doss>^U
'§' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Sandy.Doss>^E^N^T^R^P^T^U^D^E^N^T
C:\Users\Sandy.Doss>^E^D^U^L^E^T^X^T ^\^\^T
C:\Users\Sandy.Doss>AppData^E^N^T^\
C:\Users\Sandy.Doss>^\^D^A
'∟♦☺' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Sandy.Doss>^O^N^D^D^_^R^O^B^O^T^R^E^P^O^R^T
I'm sure there is a simple answer. But it's half past six o'clock and I'm ready for home! Any pointers would be gratefully accepted