1.

Solve : batch file folder create?

Answer»

I am downloading alarm logs from different computers and i need to create a folder (with SUB FOLDERS) incorporating the date and some predefined text into it. I am sure it is quite easy but i have no clue.

here is an example of what i need to do.

working from the WT01_MCC (that is the name of the computer station)

todays date is April 20 2006

I need to create a folder called: [WT01_MCC_Log_Dump_060420] and then move some files into it.

I have created a batch file to make a folder and move files to it. I just cant get the date part. here is what I have so far. (actually this is a small piece of it but I think its enough)

:WT01_MCC_COPY_ROUTINE
md f:\WT01_MCC_Log_Dump\ACTLOG
md f:\WT01_MCC_Log_Dump\ALMLOG
md f:\WT01_MCC_Log_Dump\CP
copy C:\NMS6000\UI\ACTLOG\*.dbf f:\WT01_MCC_Log_Dump\actlog
copy C:\NMS6000\UI\ALMLOG\*.dbf f:\WT01_MCC_Log_Dump\almlog
copy C:\NMS6000\CP\*.log f:\WT01_MCC_Log_Dump\cp
GOTO END

any HELP WOULD be GREATLY appreciatedRick!
This gives you the date part, i.e. 060421:

set datepart=%date:~-2%%date:~4,2%%date:~7,2%
echo.%datepart%


DOS IT HELP? Thank You very much!



Discussion

No Comment Found