ghostdog74 you are a star!
Your last suggestion worked like a charm.
My 5 test files to be edited all clone beatifully with the 60.0 changed to 50.0 and then back again to 60.0 as many times as I like with no additional spaces and hence no continual increase in file size. Magic!
I put a > nul at the end of the cscript line to get round the problem of Microsoft's header running up the screen each time that the vb script is called in the FOR DO loop.
I have cut and pasted what I had before this addition here:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
The nub of the batch file now looks like this:
@echo off
setlocal enableextensions
setlocal enabledelayedexpansion
for /f %%x in ('dir /a:-d /s /b') do (
cscript freqconv.vbs %%x %1 %2 > nul
)
)
endlocal
And the whole lot runs from the dos prompt with: H:\TEST_DIR> VBChgFreq 50.0 60.0
where my batch file is called VBChgFreq
An observation is that although this vb script version avoids trailing spaces, my impression is that the process runs more slowly than the all batch file version.
So if contrex can crack the DOS batch file problem I may go back to that but hey what an education I have had today.
Thanks very much.
Regards,
Les.