Simple task: I have a collection of files in which I want to make a series of changes, e.g. change "ALCO164.jpg" to "12345.jpg" wherever it appears. There will be about 100 such changes, and I have a Rexx script doing the overall control and calling VEDIT for each set of changes. The commands all look like this:
c:\windows\...VEDIT.EXE -q-c "Replace('ALCO164.jpg' '12345.jpg',BEGIN+ALL+NOERROR) Xall" c:\windows\...\*.htm.*
The problem is that only one file gets changed.
Note that the file spec *.htm.* selects files named, e.g. ALCO164.htm.IH
What exactly does Xall do? I could find no documentation at all for it!
-R.
> Simple task: I have a collection of files in which I want to make a
> series of changes, e.g. change "ALCO164.jpg" to "12345.jpg"
> wherever it appears. There will be about 100 such changes,
> and I have a Rexx script doing the overall control and calling
> VEDIT for each set of changes. The commands all look like this:
> c:\windows\...VEDIT.EXE -q-c "Replace('ALCO164.jpg' '12345.jpg',
> BEGIN+ALL+NOERROR) Xall" c:\windows\...\*.htm.*
> The problem is that only one file gets changed.
> Note that the file spec *.htm.* selects files named, e.g. ALCO164.htm.IH
I would suggest using WILDFILE.VDM.
The online docu should help there.
In the topic "Supplied Macros - WILDFILE - Fully Automating WILDFILE.VDM"
there is a description how to create a batch which calls VEDIT for such a task.
The easiest way would be (IMHO):
1.) Create a VEDIT macro with all the replace commands which are to be executed
for every file.
2.) Create an .INP file as described in the help to choose the files and to
execute the created macro from 1.)
3.) Create a batch file to call VEDIT (have a look into the supplied AUTOWILD.BAT)
using the created INP file from 2.)
> What exactly does Xall do? I could find no documentation at all for it!
The online docu says:
-- Xall Save all files (without prompting) and exit VEDIT.
-- It saves all modified buffers that have an assigned filename.
-- This is a fast way to exit VEDIT, saving all possible files.
-- Note: Only modified files are rewritten to disk.
I decided that the macro could handle large numbers of files, so went ahead with it. After a few tense moments caused by a couple of (unexpected!) read-only files, all went well.
This sucker is /fast/.
Thanx again for your help.
-R.