DOS Batch for download, need date from file attributes

Advertisement

-Shadow-
Guest

DOS Batch for download, need date from file attributes

Hi,

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 User@SERVER.com:
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

Reply with quote

Advertisement

You can post new topics in this forum