Renaming file after downloading with today's date?
Hi, I am using WinSCP for SFTP and it is working beautifully. I reference a txt file (see code below) and I call if from an SSIS package. The last thing I want to do is rename the source file to filename_todaysdate.txt. I have tried %date% but it just puts %date% in the filename, not the actual date. Any suggestions would be appreciated...
# 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
open login:pwd@IPAddress:Port
# Change remote directory
cd /home/emppfu/downloads
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get CDS_STAGE.txt "\\Entp14\empgroup\BSG\CDS Balancing\ToBeProcessed\"
# Disconnect
close
# Exit
exit
# 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
open login:pwd@IPAddress:Port
# Change remote directory
cd /home/emppfu/downloads
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get CDS_STAGE.txt "\\Entp14\empgroup\BSG\CDS Balancing\ToBeProcessed\"
# Disconnect
close
# Exit
exit