January 3rd, 2012, 09:28 PM
How to Get the Directory Name when it changes dynamically
I have an application which stores all the data files in one server 1.
I have to transfer these files to another server.
The only way by which I can pull the Files from Server 1 is through a special tool provided by vendor. Using that tool, i can save these files in a FTP location. The FTP directory name is created by the Tool daily.
For Ex: on Jan 2nd the directory name will be like
on Jan 3rd it will be like 2012-01-03_17.48.00.359
* this has time stamp and some other number to it
i am trying to write a script on server 2 by which I will be able to login tot he FTP and pull the files.
But as the directory names are changing dynamically, is there any command by which I can point to the latest directory.
or is there any command by which i can strip off the part of directory name
Please let me know the process to achieve this
January 5th, 2012, 09:46 PM
what language are you writing the script in?
January 5th, 2012, 10:52 PM
Originally Posted by E-Oreo