Topic "Disable deleting files from server when using example.js"

Author Message
PeteTheBeagle

Guest


I'm using the example.js script from your web site by running cscript /nologo example.js and it works great. The only changes I made to the script are my session name and the folder names. It determines the latest file and downloads it successfully but I want it to leave the original file on the server.

How do I stop it from deleting any files from my SFTP server??

I looked at the script and its doing a regular get without any -delete options:

exec.StdIn.Write(
"option batch abort\n" +
"option confirm off\n" +
"open \"" + SESSION + "\"\n" +
"get \"" + REMOTEPATH + filenameLatest + "\" \"" + LOCALPATH + "\"\n" +
"exit\n");

I'm using INI storage if that makes a difference, with all default settings in the user interface. What am I missing?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
This script should not delete any file. If it does, please post a log file.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License