Computing.Net > Forums > Programming > remove spaces in multiple filenames

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.

remove spaces in multiple filenames

Reply to Message Icon

Name: gcue
Date: November 19, 2006 at 12:00:18 Pacific
OS: DOS
CPU/Ram: 1G
Product: custom
Comment:

Hello.

I would to rename

blah1_car_test.txt blah2_car_test.txt
TO
blah1_test.txt blah2_test.txt

also a seperate script that replaces spaces in a filename with underscores

"blah1 test.txt" "blah2 test.txt"
with
blah1_test.txt blah2_test.txt

this is part of a script thats already doing other stuff so i dont want to use a 3rd party utility.

any help would be appreciated
thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Sanjaya Sugiarto (by Sanjaya)
Date: November 19, 2006 at 12:17:48 Pacific
Reply:

Use Regex (Regular Expression) for your need.


0

Response Number 2
Name: gcue
Date: November 19, 2006 at 12:25:42 Pacific
Reply:

hmm not sure what you mean.

i did regex /? at the prompt and says it wasnt a valid command


0

Response Number 3
Name: Mechanix2Go
Date: November 20, 2006 at 09:50:50 Pacific
Reply:

There is no regex in DOS.

There are no filenames with spaces in DOS.


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

M2



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: remove spaces in multiple filenames

trimming spaces in a string www.computing.net/answers/programming/trimming-spaces-in-a-string/1025.html

Batch remove %20 from filenames www.computing.net/answers/programming/batch-remove-20-from-filenames/13957.html

remove CR's, LF's & SPACES in BATCH www.computing.net/answers/programming/remove-crs-lfs-amp-spaces-in-batch/14901.html