Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

toddpnewton

updated info

I just verified that the above command and script works in 4.2.7.

I also tried both "WinSCP.com" and "WinSCP.exe /console", and there is no difference in behaviour: it works in 4.2.7, does not work in 4.2.8.


I have to revert back to 4.2.7 to get the job done, but looking forward to a patch/update. If you need any additional info please ask - I will try to get it for you.
toddpnewton

*Invalid Access to Memory* --after 'close' command in script

Hello.
Using the current version of WinSCP [4.2.8] on Windows XP SP 3.
Running a script to synchronize local to remote. Actual synchronization is performed flawlessy.
After 'close' command I recieve 'Invalid Access to Memory", returns an error level of 1.
This happens every time - always reproducible. Also reproduced on a different PC.

//***********************************
// I invoke script with this command:
//***********************************
"C:\Program Files\WinSCP\WinSCP.com" /log"C:\DATA_Archive\Data Synchronize.xml" /script="C:\Program Files\Fallbrook Technologies\WinSCP Sync.txt" /parameter "C:\DATA" "Test Data/xxxxxxxx/EOL"

//***********************************
// This is the script "WinSCP Sync.txt":
//***********************************
# OPTIONS
option echo off
option batch on
option confirm on
option reconnecttime 10

# OPEN SESSION
# open [ sftp|ftp|scp:// ][ <user> [ :password ] @ ] <host> [ :<port> ]
open sftp://xxxxxxx:XXXXXXXX@xxx.exavault.com -hostkey="ssh-rsa 2048 nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn:nn"

# lcd "%1%"
# cd "%2%"

# SYNCH copies new local to remote
# synchronize local|remote|both [ <local directory> [ <remote directory> ] ]
synchronize remote "%1%" "%2%"

#CLOSE SESSION
close

#EXIT WinSCP
#exit

//***********************************
// I get the following output
// In this case everything is synched already from previous calls.
// Get same error when there are files to synch also
//***********************************
echo off
batch on
confirm on
reconnecttime 10
Searching for host...
Connecting to host...
Authenticating...
Using username "xxxxxxx".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] xxxxxxx@xxxxxxx/exavault.com
Comparing...
Local 'C:\DATA' => Remote 'Test Data/Tristar/EOL'
Nothing to synchronize./
Now session
Invalid access to memory
winscp>
//************************************


After this, I exit, and read the errorlevel 1.

I have successfully performed a very similar operation in the past, perhaps about 3 months ago. However, it was on a different machine with a different version of the script. I apologize for not knowing much more than that - I uninstalled after testing and only returned to it these last 2 weeks.

Thank you and best regards, Newton