You asked so nicely.
So, you want to change "%USERPROFILE%\Games" to "d:\games" in a batch file. Say, this batch file is at C:/install/install.bat.
# Script Games.txt
var str contents
cat "C:/install/install.bat" > $contents
while ( { sen "^"%USERPROFILE%\\Games^" $contents } > 0 )
sal "^"%USERPROFILE%\\Games^" "d:\\games" $contents > null
echo $contents > "C:/install/install.bat"
Script is in biterscripting (
http://www.biterscripting.com ). Save the script in file C:/Scripts/Games.txt, start biterscripting, enter the following command,
script "C:/Scripts/Games.txt"
That will change "%USERPROFILE%\Games", in every place it occurs in that batch file, to "d:\games".
Change the "C:/install/install.bat" in the script to the correct path of the batch file before trying. Enclose the path in double quotes.
Patrick