date variable in script file

Advertisement

murrayb3024
Guest

date variable in script file

We create a daily file that I need to upload to a vendor. I can hard code the file name and that works but it changes daily so I need to send a file like:

c:\myfilepath\myFile_20130122.txt where the date portion changes daily and needs to be yyyymmdd.

I am not having luck with that part. Any help is appreciated.

Reply with quote

Advertisement

mjb0622
Guest

Date parameter within text

Does anyone have a sample of this solution. I am trying to do the same with a date.
The file name cahnages by day and i need to update several systems with the same file.
How do I pass the date to the text file?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Re: Date parameter within text

mjb0622 wrote:

Does anyone have a sample of this solution. I am trying to do the same with a date.
The file name cahnages by day and i need to update several systems with the same file.
How do I pass the date to the text file?
See example here.
https://winscp.net/eng/docs/script_download_timestamped_filename
Or even better, use WinSCP .NET assembly:
https://winscp.net/eng/docs/library

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum