synch script works Win 7 not Win XP (but GUI always works) - why!?
Hello. I am trying to synchronize a local drive with a folder on a file server using SFTP:
Source: local drive D:
Destination: file server folder at a known ip address
Mode: 'remote' - changes made at source are made at file server but not the other way (no deletion)
Problem: I wrote a very simple script that is called by a batch file run each night via Windows Task Scheduler; it opens the SFTP session, runs the synchronization command in 'remote' mode, then closes the session. This works perfectly on a Windows 7 32-bit machine I maintain. Unfortunately, it DOES NOT WORK on a Windows XP machine that I maintain. BUT, when I run the synch using the GUI Commander interface on this Windows XP machine, the sync works great!
Here is the command in the batch:
Here is the script:
Attached: I have included the log file. In the log file you will see the line ". 2016-04-09 08:59:41.000 Local file 'D:\LMB\Quinpirole Dose Response\System Testing\test_sync_4-09-0837.txt' [2016-04-09T14:37:47.984Z] [16] is new
" ; I created the file test_sync_4-09-0837.txt locally to test the sync. Indeed it sees it as new, but it never syncs it! It ends with "< 2016-04-09 08:59:43.062 Script: Nothing to synchronize." !
If I run the GUI Commander Interface, it synchronizes this just fine and copies the file. What?!
I have not been able to solve this. I cannot upgrade the machine from Windows XP because the users have legacy hardware that they are using for their work.
Any help would be greatly appreciated!
Source: local drive D:
Destination: file server folder at a known ip address
Mode: 'remote' - changes made at source are made at file server but not the other way (no deletion)
Problem: I wrote a very simple script that is called by a batch file run each night via Windows Task Scheduler; it opens the SFTP session, runs the synchronization command in 'remote' mode, then closes the session. This works perfectly on a Windows 7 32-bit machine I maintain. Unfortunately, it DOES NOT WORK on a Windows XP machine that I maintain. BUT, when I run the synch using the GUI Commander interface on this Windows XP machine, the sync works great!
Here is the command in the batch:
winscp.com /script=C:\SFTP_synchronize_script_CC_slicedata.txt >> "C:\Documents and Settings\Administrator\Desktop\Sync_results.txt" /log="C:\winscplog.log"
Here is the script:
open sftp://Username(removed):Password(removed)@XXX.XXX.XXX.XXX/ synchronize remote D:\ /Slice_Data/ close exit
Attached: I have included the log file. In the log file you will see the line ". 2016-04-09 08:59:41.000 Local file 'D:\LMB\Quinpirole Dose Response\System Testing\test_sync_4-09-0837.txt' [2016-04-09T14:37:47.984Z] [16] is new
" ; I created the file test_sync_4-09-0837.txt locally to test the sync. Indeed it sees it as new, but it never syncs it! It ends with "< 2016-04-09 08:59:43.062 Script: Nothing to synchronize." !
If I run the GUI Commander Interface, it synchronizes this just fine and copies the file. What?!
I have not been able to solve this. I cannot upgrade the machine from Windows XP because the users have legacy hardware that they are using for their work.
Any help would be greatly appreciated!