How to find out which remote directories I should be in?
Posted on 2008-10-07
I'm connecting to a server thru FTP. Before I do a "cd" to a directory, I need to figure it out which directory. Every mid month the directory change, I need to know the best way of doing it.
below is like a table. The date has to be in between the from and to date, then directory will be set.
From To directories
prev_yyyy-12-16 -> curr_yyyy-01-15 = curr_yyyy_01_report (directory)
curr_yyyy-01-16 -> curr_yyyy-02-15 = curr_yyyy_02_report (directory)
curr_yyyy-02-16 -> curr_yyyy-03-15 = curr_yyyy_03_report (directory)
curr_yyyy-03-16 -> curr_yyyy-04-15 = curr_yyyy_04_report (directory)
curr_yyyy-04-16 -> curr_yyyy-05-15 = curr_yyyy_05_report (directory)
curr_yyyy-05-16 -> curr_yyyy-06-15 = curr_yyyy_06_report (directory)
curr_yyyy-06-16 -> curr_yyyy-07-15 = curr_yyyy_07_report (directory)
curr_yyyy-07-16 -> curr_yyyy-08-15 = curr_yyyy_08_report (directory)
curr_yyyy-08-16 -> curr_yyyy-09-15 = curr_yyyy_09_report (directory)
curr_yyyy-09-16 -> curr_yyyy-10-15 = curr_yyyy_10_report (directory)
curr_yyyy-10-16 -> curr_yyyy-11-15 = curr_yyyy_11_report (directory)
curr_yyyy-11-16 -> curr_yyyy-12-15 = curr_yyyy_12_report (directory)