Hi,
Right now i have a package that i'm executing manually, but want to automate the process and i'm facing some problems. Hopefully some guru can me some advice or point me to a dcoument or a blog.
Purpose of the Package: To sftp to a remote server and copy files over to the local DEV Server. Once the 3 files are copied over to the local DEV Server , the 3 files have 3 different DFT's based on their requirements. The script i'm using to sftp the three
files from the remote server is as below:
option batch on
option confirm off
open sftp://<username>:<password>@server -hostkey="ssh-dss xxxxxxxxxxxxxxxx"
cd .
option transfer binary
synchronize local [ <local directory> [ <remote directory> ] ]
*.txt F:\FTPShare\ftp\
close
exit
The challanges i'm facing are:
1) The Old files on the remote server are not deleted, so my script is bring all the files. They have date as a suffix (need help in tweaking my code to get the recent files).
2) Once these files are copied to the local server (DEV), what i'm facing is. The three files have a connection manager each and i have to speciy the exact file name including the date extension each time i need to execute the package. I'm looking for something
that is independent of the date extension.
For example i have the files CTA-201307.TXT,CTD-201307.TCT,CTF201307.TXT that i copied from the remote to the local server on to the C drive ( so the 3 connection managers have the location as C:\ CTA-201307.TXT,C:\ CTD-201307.TXT,C:\ CTAF201307.TXT.
In August the file names are changed to CTA-201308.TXT,CTD-01308.TCT,CTF201308.TX.
So i have to manually edit these files in the connection managers, so am looking for a way where in i need not go every month and change them manually. Please need help.
Thanks
SV