Computing.Net > Forums > Programming > batch script strip off extension

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 script strip off extension

Reply to Message Icon

Name: bong25
Date: March 14, 2009 at 06:13:19 Pacific
OS: Windows Vista
Subcategory: Batch
Comment:

Hi! all,

I am looking for a DOS batch script that can do the following but with strip off extension.

dir/b *.ext > list.txt

now what I want is that the content of list.txt will have a list of files without the .ext extension.



Sponsored Link
Ads by Google

Response Number 1
Name: bong25
Date: March 14, 2009 at 08:36:47 Pacific
Reply:

Found it, the answer is only here, just tried to search for it thoroughly.

@FOR /f "delims=" %%? IN ('DIR/b *.frm') DO @ECHO/%%~n? >>d:\listfrm.txt


0
Reply to Message Icon

Related Posts

See More


increment variable in bat... Shell script to Display s...



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 script strip off extension

xp batch script www.computing.net/answers/programming/xp-batch-script/15011.html

Perl Script stripping off the : www.computing.net/answers/programming/perl-script-stripping-off-the-/8251.html

Batch Script Help and Suggestions www.computing.net/answers/programming/batch-script-help-and-suggestions/14552.html