Solved

Find and Replace

Posted on 2014-03-27
5
193 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now