Topic "DOS Batch for download, need date from file attributes"

Author Message



im new with this program but i need because of work a fast solution.
in the moment i use this script:

set pscp_cmd=pscp -q -C -scp -2 -unsafe -P 22 -i PWMS_PRIVATE_KEY.ppk
set dest=C:\MyFolder
%pscp_cmd%/Sub_Folder/Filename_(date).csv %dest%/Filename_(date).csv

this just copys a file from the sftp share to my harddisk.
in moment i have to change the (Date)-part of the filename every day by hand
and for this i need an automation...

I need the latest version of the file that exists in the Folder
how to get these? is there a option or method i can use for a loop
to read the file attributes? how to set the "SubFolder" as variable in a dos batch?

can sombody please show me some Code as examble for this?
thanks a lot

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License