R
Raven
Hi,
I am modifying my previous written batch file(though I am an amateur)
which can daily download a list of log files from a list of sftp
servers, which generates the logs daily. Since the previous script only
downloads ALL the files at night, which may cause certain problems as
the number of file in the servers get larger. I wish to write a batch
file that can get files generated yesterday (please note that log
filename follows the YYYYMMDD convention).
My previous operation is that I have a batch file which lists the
server and run psftp with another cmd for the software. My trouble now
is that the psftp seems not to support local system variable in their
wildcard.
(if yes, I can simply wirite psftp (e-mail address removed)....
cd ....
mget .../.../*%Dayvar%*)
previous operation:
Batch file(contain of list of server ips; psftp is called here) ->
psftp command file (contain the operation command for psftp)
end
So now I am thinking of another method. Could I generate one text file
by batch daily automatically before the downloading start which I can
specify the date. After psftp is fed with this file when it is called
by the batch file, it can seamlessly download all files in the server
whose names bear, say, 12?)
so my proposed operation:
batch file(generate a command file based on local system date for psftp
before the downloading start)->
batch file(contain of list of server ips; psftp is called here with the
newly created command file)
psftp does its job by running the newly created file
done
Thanks very much. And if you do know anyway of doing so, please let me
know.
I am modifying my previous written batch file(though I am an amateur)
which can daily download a list of log files from a list of sftp
servers, which generates the logs daily. Since the previous script only
downloads ALL the files at night, which may cause certain problems as
the number of file in the servers get larger. I wish to write a batch
file that can get files generated yesterday (please note that log
filename follows the YYYYMMDD convention).
My previous operation is that I have a batch file which lists the
server and run psftp with another cmd for the software. My trouble now
is that the psftp seems not to support local system variable in their
wildcard.
(if yes, I can simply wirite psftp (e-mail address removed)....
cd ....
mget .../.../*%Dayvar%*)
previous operation:
Batch file(contain of list of server ips; psftp is called here) ->
psftp command file (contain the operation command for psftp)
end
So now I am thinking of another method. Could I generate one text file
by batch daily automatically before the downloading start which I can
specify the date. After psftp is fed with this file when it is called
by the batch file, it can seamlessly download all files in the server
whose names bear, say, 12?)
so my proposed operation:
batch file(generate a command file based on local system date for psftp
before the downloading start)->
batch file(contain of list of server ips; psftp is called here with the
newly created command file)
psftp does its job by running the newly created file
done
Thanks very much. And if you do know anyway of doing so, please let me
know.