I have been using F.A.R.T and simple batch to edit a txt file with the out put of the net use command:
in my text file in need to change often I have a defined path changeme\software\sql
in the batch net use shows location of a shared folder on the net work \server\shared
I "mark" this in the CMD window and paste into user input prompt
then FART will replace changeme with \server\shared to complete fully into \server\shared\software\sql
this has been working a treat, till today where there was a space in the path to the shared
\server\shared area
and FART doesn't understand spaces and breaks with syntax error's and things. I looked into all the switches and none seem to be let me replace text with a space in it.
Is there a better way to do this, better tool, seen power shell is good, but I don't know what versions im going to arrive at so could be more trouble changing the codes to suit the versions.
Wonder I can do this purely in batch without farting. Many thanks
echo.
type "%~dp0logo.txt"
echo.
echo.
echo F| XCOPY "%~dp0Software\client.txt" /y "%~dp0DSoftware\config.cfg"
net use
pause
set /p N=enter shared:
"%~dp0Software\fart" -i -r "%~dp0Software\config.cfg" \\changeme %N%