1.

Solve : Phantom Directory Name?

Answer»

operating system Win2k

I have the following situation that has me stumped. I have limited DOS knowledge.

Each day I receive files that are ftp'd to my company in which the name of the directory is different with each ftp session. The format of the directory name is yymmdd_hhmmss where:
yy = year,
mm = month,
dd = day,
hh = hour,
mm = minute
ss = seconds

This is the date & time the session took place.  i.e 041214_132546

I need to be able to have a batch file capture the name of the directoy, so all the *.pdf files contained in that directory can be copied to another directory whose name changes monthly.
The target directory path would be YYYY\MM. where YYYY = the current year and MM = the number of the current month.
Each YYYY directory would have 12 subdirectories 01 - 12.  i.e. 2004\12

currently I am using the following, but this method is prone to typing errors.and has to be CHANGED for each use.


dalycopy.bat 041214_132546 12
copy I:\from_ftp\%1\*.pdf I:\pdfs\2004\%2
exit

I would like to be able the have the batch run without HUMAN intervention.

ThanksTry putting it in the TASK schedualler.http://www.robvanderwoude.com/index.html



Discussion

No Comment Found