Solved

Find and Replace

Posted on 2014-03-27
5
195 Views
Last Modified: 2014-05-29
Seeking to quickly locate files on my storage device that have common names like:

example01, example02, example03.....and rename them as:  red01, yellow02, green03

Using Windows 7.  Former versions of had FileManager and other tools that used wildcards to quickly search and replace.  The Search tool in Windows 7 works great, but haven't found a replace feature that works with the search.

Someone find a solution?
0
Comment
Question by:clock1
  • 3
5 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 39960337
You can open a command line and enter this command:

for /f "delims=*" %a in ('dir example01.* /b /s') do ren "%a" red01.*

repeat for each one:

for /f "delims=*" %a in ('dir example02.* /b /s') do ren "%a" yellow02.*

etc.

or you should be able to create a batch file with all commands:

@echo off
for /f "delims=*" %a in ('dir example01.* /b /s') do ren "%a" red01.*
for /f "delims=*" %a in ('dir example02.* /b /s') do ren "%a" yellow02.*
for /f "delims=*" %a in ('dir example03.* /b /s') do ren "%a" green03.*
0
 

Author Comment

by:clock1
ID: 39960543
Is DOS the only alternative?
0
 
LVL 16

Expert Comment

by:Gerald Connolly
ID: 39961138
Well its probably the easiest, you could do it with Perl, but that is a bit more complicated
0
 

Accepted Solution

by:
clock1 earned 0 total points
ID: 39961436
Or could use FileTree.xla to produce recurrsive directory tree in Excel and use Find/Replace there.
0
 

Author Closing Comment

by:clock1
ID: 40097760
In this case, works best for me.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question