Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Aiight I admit that I'm new to batch files and i have little to no programming experience. That said, I've been trying to get a batch file to work that will juggle two folders depending on my input and what folders exist already. This is what i've gotten so far...
it doesn't work. goto end isn't working in any case, so something must be buggered. The folder names and what I want them to do are correct, i must be screwing up the modifiers. Help plz!
@ECHO off
:BEGINSET /P variable="Rockband 1, GH3 2"
if "%VAR%" == "1" (
if exist "C:\GH3\GH3DATA" GOTO END;
ren C:\GH3\DATA GH3DATA
ren C:\GH3\ROCKBANDDATA DATA
GOTO END;
)
if "%VAR%" == "2" (
if exist "C:\GH3\ROCKBANDDATA" GOTO END
ren C:\GH3\DATA ROCKBANDDATA
ren C:\GH3\GH3DATA DATA
GOTO END;
):END
exec C:\GH3\GH3.exe

@echo off
choice /C:12 " Rockband 1, GH3 2 "
if ErrorLevel 2 (
if exist "C:\GH3\ROCKBANDDATA" goto :END
move C:\GH3\DATA ROCKBANDDATA
move C:\GH3\GH3DATA DATA
goto :END
)
if ErrorLevel 1 (
if exist "C:\GH3\GH3DATA" goto :END
move C:\GH3\DATA GH3DATA
move C:\GH3\ROCKBANDDATA DATA
goto :END
)
:END
Start "" "C:\GH3\GH3.exe":: End_Of_Batch
To rename a folder use MOVE not REN.
Batch does not recognize ; and exec is not a valid command. To get a short help on commands type at prompt the command code followed by /? e.g.choice /?
Beware batch scripting is programming too.

Thank you! Exactly what I need. This is for private use, so I don't plan on getting into any trouble with it ;)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |