#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0

    How to Get the Directory Name when it changes dynamically


    Hello

    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
    2012-01-02_11.58.00.824

    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

    thanks
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    what language are you writing the script in?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by E-Oreo
    what language are you writing the script in?
    UNIX

IMN logo majestic logo threadwatch logo seochat tools logo