Computing.Net > Forums > Windows XP > 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: mbell
Date: April 9, 2009 at 02:54:08 Pacific
OS: Windows XP
Subcategory: General
Comment:

Hi,
I want to use a batch file to delete all folders in a directory that have a certain prefix, say, all folders whose name starts with "abc". How would I go about this?

Thanks,
Matt



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: April 9, 2009 at 03:08:28 Pacific
Reply:

:: DELDIR.BAT  Usage: deldir Folder_Name
@echo off
pushd %*
for /D %%j in (abc*) do RD /Q /S "%%j"
popd
:: End_Of_Batch


0

Response Number 2
Name: mbell
Date: April 9, 2009 at 03:46:46 Pacific
Reply:

Thanks, this works perfectly!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


email attatchment problem... Windows won't load -even ...



Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch file help

Batch File Help www.computing.net/answers/windows-xp/batch-file-help/164222.html

Batch file help needed... www.computing.net/answers/windows-xp/batch-file-help-needed/163063.html

Dos Batch File HELP! www.computing.net/answers/windows-xp/dos-batch-file-help/163943.html