Solved

replace in files tool

Posted on 2000-02-22
21
218 Views
Last Modified: 2013-12-28
I need command line tool for quick replacing given substrings in many files
I found findstr, but where replacestr??? :)
0
Comment
Question by:vladi21
  • 9
  • 7
  • 5
21 Comments
 
LVL 2

Expert Comment

by:prosit
ID: 2547527
There is none in NT!

You can use wordpad which has the CTRL+H (S&R) but that's not really command line :)

Otherwise my advice is to look at www.winfiles.com where I'm sure there's a search/replace commandline tool.

Let me know if you want help finding it!

T
0
 
LVL 7

Author Comment

by:vladi21
ID: 2547560
exact url
http://winfiles.cnet.com/apps/nt/text-search.html

but which is best tool and fastest?
0
 
LVL 2

Expert Comment

by:prosit
ID: 2547601
Why does it have to be command line?

t
0
 
LVL 7

Author Comment

by:vladi21
ID: 2547610
it must be used in .bat files
0
 
LVL 2

Expert Comment

by:prosit
ID: 2547652
Why does it have to be command line?

t
0
 
LVL 2

Expert Comment

by:prosit
ID: 2547655
sorry about the repeated answer :)

Alright, got ya!

I'll be back!

T
0
 
LVL 2

Expert Comment

by:prosit
ID: 2547661
Found the tool you need, send me your email address and I'll mail you the tool!

T
0
 
LVL 7

Author Comment

by:vladi21
ID: 2547721
can u specify url?

i have got blue screen after installing one of these tools :(
0
 
LVL 7

Author Comment

by:vladi21
ID: 2547731
the must have same functionality as findstr + replace feature

 /F:file   Reads file list from the specified file(/ stands for console).
 /G:file   Gets search strings from the specified file(/ stands for console).

I need these options

0
 
LVL 2

Expert Comment

by:prosit
ID: 2547742
I got it from my cd-rom drive :)

No url for that (not one that I want to give you)

If you don't want to show it here, then send an email to taxman@coolemail.com and I'll send it back.

Me
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 2

Expert Comment

by:prosit
ID: 2547785
It's in the mail!

Tax
0
 
LVL 7

Author Comment

by:vladi21
ID: 2547811
thanx but I need these options

 /F:file   Reads file list from the specified file(/ stands for console).
 /G:file   Gets search strings from the specified file(/ stands for console).

0
 
LVL 23

Expert Comment

by:Tim Holman
ID: 2550019
0
 
LVL 7

Author Comment

by:vladi21
ID: 2550032
I need replace feature!
0
 
LVL 23

Expert Comment

by:Tim Holman
ID: 2550381
What format are the files in ?
Does each field have a standard delimiter ?
If the files are of the same type, and strings are delimited by commas, or spaces, or at least something, then a batch file could be knocked up that parses each line, changes text where necessary, then saves each line to an open file, which closes when you've finished.
If this is what you want then I'll get batching....
0
 
LVL 7

Author Comment

by:vladi21
ID: 2550427
I have file with strings (each string on new line) and 5000+ files
0
 
LVL 23

Expert Comment

by:Tim Holman
ID: 2550641
Is the substring you're searching for seperated by anything ?
Could you post up an example file, with details of what you want replacing with what ?
0
 
LVL 7

Author Comment

by:vladi21
ID: 2553963
a1
a2
a3

must be changed quickly to

b.a1
b.a2
b.a3

in all files with mask *.aaa

thanx
0
 
LVL 23

Expert Comment

by:Tim Holman
ID: 2554551
I'm working on it !
0
 
LVL 23

Accepted Solution

by:
Tim Holman earned 100 total points
ID: 2558418
Try MUNGE.EXE from the resource kit.
0
 
LVL 7

Author Comment

by:vladi21
ID: 2561173
Sorry funch, but tim_holman's answer is exactly what I need
0

Featured Post

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

705 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

21 Experts available now in Live!

Get 1:1 Help Now