Computing.Net > Forums > Programming > dos renaming

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.

dos renaming

Reply to Message Icon

Name: buddha
Date: May 5, 2009 at 21:23:01 Pacific
OS: Windows 2000
Subcategory: Batch
Comment:

dear all
I am a novice user of dos commands. What I need to do now:
renaming a file with hyphens "-" to without hyphens. Plz help.



Sponsored Link
Ads by Google

Response Number 1
Name: Valerie (by Garibaldi)
Date: May 6, 2009 at 00:02:46 Pacific
Reply:

ren file-name.ext filename.ext


0

Response Number 2
Name: Mechanix2Go
Date: May 6, 2009 at 00:29:02 Pacific
Reply:

You can forget "dos" [sic].

In win2000:

=============================
:: get - ouy of file name
:: nohyph Wed 06-05-2009 13:59:33.01

@echo off & setLocal EnableDelayedExpansion

for /f "tokens=* delims=" %%a in ('dir/b/a-d') do (
set name=%%~Na
set name=!name:-=!
echo ren %%a !name!%%~Xa
)


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

M2


0

Response Number 3
Name: buddha
Date: May 6, 2009 at 00:52:10 Pacific
Reply:

Dear all let me be more clear.

I hav 1500, .pdf files, in their names they contains hyphens , i need to remove that.Plz help.
I need a batch file.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


VB 2008 printing c programming



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: dos renaming

renaming with dos? www.computing.net/answers/programming/renaming-with-dos/15318.html

Rename file to system date batch www.computing.net/answers/programming/rename-file-to-system-date-batch/15335.html

Batch File Rename www.computing.net/answers/programming/batch-file-rename/9953.html