Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How can I mass rename files from the command line or using a 3rd party tool?

I have many PDFs of EBooks but some of them have underscores in their filenames so it becomes difficult to search the file by some words. Is there any program/script/software which replace all underscores with blank space in windows 7

share|improve this question
    
Definitely a dupe. –  EBGreen Jun 14 '11 at 15:44
    
Duplicate post (link). Here's your one-liner CLI answer - without installing additional software: for /f "tokens=* delims= " %i in ('dir /b "*.pdf"') do Set LIST=%i& set LIST | ren "%~fi" "%LIST:_= %" –  Murdoch Ripper Oct 30 '13 at 17:10
add comment

marked as duplicate by ChrisF, Darth Android, Sathya Jun 14 '11 at 15:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 1 down vote accepted

It is really old software, but I use Lupas Rename 2000 to rename files in bulk. One of the rules you can use is "Replace text (_) with new text ( )".

It was last updated in 2005, but it is light, fast, and still works in Windows 7.

share|improve this answer
add comment

From the command line:

dir *.pdf /b | mawk "/ / { q=sprintf('%c',34); new=$0; gsub(/ /, '_', new ); print     'ren 'q$0q' 'new }"

This command will not do anything, but output the command about to be executed. To execute it, you just add cmd at the end:

dir *.pdf  /b  |  mawk  "/ / { q=sprintf('%c',34); new=$0; gsub(/ /, '_', new ); print 'ren 'q$0q' 'new }" | cmd

You can download mawk.exe from http://www.klabaster.com/freeware.htm#mawk

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.