The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: RuiLoureiro on January 24, 2009, 08:51:42 PM

Title: Replacing words
Post by: RuiLoureiro on January 24, 2009, 08:51:42 PM
Hi
         I have some files in some folders. In that files there are words RCLG5 for instance that i want to change to RCLG6.
         Is there a tool to replace that words in all files in one folder without opening it?
Thanks
Rui
Title: Re: Replacing words
Post by: KeepingRealBusy on January 24, 2009, 08:56:19 PM
If you want to change something in a file in a folder, then you have to open the file, edit the data, write the file, and then close the file. At least something has to open the files - several scripting languages can do this for you.
Dave.
Title: Re: Replacing words
Post by: RuiLoureiro on January 24, 2009, 09:01:30 PM
Quote from: KeepingRealBusy on January 24, 2009, 08:56:19 PM
If you want to change something in a file in a folder, then you have to open the file, edit the data, write the file, and then close the file.
Hi Dave,
              Its what i normaly do (Find - Replace). My question is: do you Know a tool ?
Rui
Title: Re: Replacing words
Post by: Jimg on January 24, 2009, 09:17:33 PM
Ultraedit can do that.  I'm sure there are others also.
Title: Re: Replacing words
Post by: RuiLoureiro on January 25, 2009, 04:46:48 PM
Quote from: Jimg on January 24, 2009, 09:17:33 PM
Ultraedit can do that.  I'm sure there are others also.
Thank you Jimg, i tried it one time ...but without success. It seems too complex, no ?
Rui
Title: Re: Replacing words
Post by: BlackVortex on January 25, 2009, 06:25:00 PM
For jobs like this I write Autoit scripts    :thumbu
Title: Re: Replacing words
Post by: Jimg on January 25, 2009, 06:59:22 PM
Just click on "search/replace in files".  I don't know what could be simpler.
Title: Re: Replacing words
Post by: RuiLoureiro on January 25, 2009, 09:08:11 PM
BlackVortex  ,
                   «... I write Autoit scripts ». I dont know how to do that  :thumbu

Quote from: Jimg on January 25, 2009, 06:59:22 PM
Just click on "search/replace in files".  I don't know what could be simpler.

Jimg, it doesnt work.

Search -> Replace in files
Find what           RCLLIB5         
Replace with        RCLLIB1
In files/Types      .asm
Directory:          E:\MASM32\RCLGES1\

The Result is:
0 items replaced in 0 files.

I have this:          include \masm32\RCLLIB5\Fnt.GLB   (this is one line inside Fnt.asm
                                                                              and Fnt.asm is in E:\MASM32\RCLGES1)
and i want to get  include \masm32\RCLLIB1\Fnt.GLB
Rui
Title: Re: Replacing words
Post by: Jimg on January 26, 2009, 12:42:05 AM
the In files/Types needs to be     *.asm
just .asm is not sufficient
Title: Re: Replacing words
Post by: RuiLoureiro on January 26, 2009, 04:32:21 PM
Quote from: Jimg on January 26, 2009, 12:42:05 AM
the In files/Types needs to be     *.asm
just .asm is not sufficient
Jimg,
          may be i got the wrong UltraEdit ! It doesnt work, doesnt change anything ! with or without *.asm
          i am sure the files are there the names are there but doesnt change
Rui
Title: Re: Replacing words
Post by: Jimg on January 26, 2009, 04:51:54 PM
Sorry, I don't know what to tell you.  I've used it many times without problems.

If you want to upload fnt.asm, I can run a test.

Otherwise, be sure you have the Regular Expressions box unchecked, Unicode search unchecked (unless it is in unicode),  etc., and that you don't have any extra spaces or unwanted characters in the "Find What" box.

Title: Re: Replacing words
Post by: RuiLoureiro on January 26, 2009, 05:06:23 PM
Jimg,
         many thanks to you  :U - it is working correctly now i have made a mistake, sorry
Rui