need help with editing dos batch file

hello there i dont know whwther this the right section to post but i found this more appropriate then others i want to edit the install path of a dos batch file and i dont know the commands i tried to change it but somehow the changes delete data from my drive the actual commands are which i can acess by right clicking on the icon and selecting edit
set CDIR=%CD%Install Files
set ID=%USERPROFILE%GamesUnreal Tournament 2004
i want to change it to d:games how should i do that and also there is a command line with echo * Game Path: %ID%
kindly help as u guys are quite learned


  • 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.

    [code]# 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"[/code]

    Script is in biterscripting ( ). Save the script in file C:/Scripts/Games.txt, start biterscripting, enter the following command,

    [code]script "C:/Scripts/Games.txt"[/code]

    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.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion