Computing.Net > Forums > Programming > batch file help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file help

Reply to Message Icon

Name: martymix
Date: January 7, 2006 at 09:58:10 Pacific
OS: winxpsp2
CPU/Ram: 512
Comment:

Hi
Could anyone help me figure this out?


I’m trying to create a batch file that will go to the C:\ drive and search for the last folder created
(e.g SU550)

then create a new folder called SU551

Also I need to have subfolder in testfolder2

testfolder2
-testdata1
-testdata2


Thanks in advance




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: January 7, 2006 at 19:37:30 Pacific
Reply:

This may work to create sequentially numbered dirs in the root. Not sure what you need to do beyond that.

::=== SEQdir#.bat
c:
cd \
for /f %%D in ('dir /od/ad/b') do set newest=%%D
set pre=%newest:~0,2%
set /a num=%newest:~2,3%
set /a num+=1
md %pre%%num%
:: DONE


If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: martymix
Date: January 8, 2006 at 04:52:23 Pacific
Reply:

Hi Mechanix2Go

Big thank you for help with the script.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file help

Batch File Help www.computing.net/answers/programming/batch-file-help-/11464.html

batch file help www.computing.net/answers/programming/batch-file-help/190.html

Mechanix2 - Ping Batch File Help www.computing.net/answers/programming/mechanix2-ping-batch-file-help/15252.html