Help "get" command overwrites existing downloaded files

Advertisement

15wileyr
Joined:
Posts:
3

Help "get" command overwrites existing downloaded files

Hello, I am close to success setting up my use case but have run into a final hurdle. I have set up a batch file to run a script for WinSCP to download a file from my server. This is working, but WinSCP behavior appears to default to overwriting an existing file by that name vs doing something like file, file (1), file(2), etc. I would these files to stack up on my personal drive to serve as a log from my server instead of being overwritten. Is there an alternative parameter for the get command that I am missing?

For reference

Batch:
"X:\Programs\WinSCP (SSH)\WinSCP.exe" /log="X:\XXX\XXX\XXX\example.log" /script="X:\XXX\XXX\XXX\script.txt"
WinSCP passed Script:
open ftp://XXXXXXX.XXXXXX:Address.co/
 
cd /default
lcd "Z:\XXX\Server Backups"
 
get fileinquestion .\
 
exit

Reply with quote

Advertisement

15wileyr

I see what might also be happening, my "File" is actually a folder and series of many subfolders instead of just a "File" what do you think I ought to do there?

Reply with quote

15wileyr

For anyone curious I was able to get my use case done by, downloading a zip file from my server instead, scheduling the download in Windows Task Scheduler. Then 30min later running a batch file that renames then robocopy's with the /mov parameter also with Task Scheduler. sigh XD

Reply with quote

Advertisement

You can post new topics in this forum