Update script file for changing file name
Our vendor made a change and now we have to modify a script that we have been using for quite some time. Not really sure how to modify it.
What it currently looks like:
What we have to do now is change the filename to FileMMDDYYYY.txt using the current days values. Is there an easy way to do this?
Thanks
What it currently looks like:
# Automatically answer all prompts negatively not to stall # the script on errors option batch on # Disable overwrite confirmations that conflict with the previous option confirm off # Connect using a password # Connect open sftp://xxxxxxxxxxxxxxx -hostkey="xxxxxxxxxxxxxxxxxxx" # Upload the file to current working directory option transfer ASCII put "\\myfilepath\File.txt" -nopermissions -nopreservetime # Disconnect close # Exit WinSCP exit
What we have to do now is change the filename to FileMMDDYYYY.txt using the current days values. Is there an easy way to do this?
Thanks