Link to home
Start Free TrialLog in
Avatar of hgj1357
hgj1357

asked on

modify 2,000 text files

I have approx 2,000 text files in this format:

0.5000
0.0000
0.0000
-0.5000
2837500.2500
2272499.7500

lines 5 and 6 are coordinates.  I nned to add 0.375 to line 5 and subtract 0.375 from line 6 for all 2,000 files.
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

You have the question marked for DOS.  Can this be done in vbscript, powershell or another language?
Avatar of hgj1357
hgj1357

ASKER

I would rather a solution using .CMD scripts, but beggars can't be choosers - I'll take what I can get!
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hgj1357

ASKER

Do I save that as a .vbs and run it?
No that is Powershell, not VBscript.  You would save it as a .ps1 file, adjusting the full path at the top to the files to be processed.  The files will be overwritten, so always test on a copy of the masters.

This will walk you through the process to create and run the file...

How to create and run a PowerShell script file on Windows 10 | Windows Central


»bp