VOGONS

Common searches


First post, by tronds

User metadata
Rank Newbie
Rank
Newbie

Hi,
I'll go straight to the problem.
When I try to execute this batch file, Dosbox freezes (No error message) and the only thing to do is to use Task Manager and force-quit it.

This is the bat file I'm trying to execute:

ECHO OFF
CLS
:MENU
ECHO.
ECHO ...............................................
ECHO PRESS 1 or 2 to select your task, or 3 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Export Favorites from COMPUTER to PERSONAL DRIVE (P:)
ECHO 2 - Import Favorites from PERSONAL DRIVE (P:) to COMPUTER
ECHO 3 - EXIT
ECHO.
SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO EXPORT
IF %M%==2 GOTO IMPORT
IF %M%==3 GOTO EOF
:EXPORT
XCOPY "%userprofile%"\Favorites\*.* P:\Favorites\ /S/Y
GOTO MENU
:IMPORT
XCOPY P:\Favorites "%userprofile%"\Favorites\*.* /S
GOTO MENU

Whenever I try to launch another bat-file it works fine, so I guess it's a problem with this specific bat-file. Could someone confirm this?

Thank you in advance.

Reply 5 of 6, by Tetrium

User metadata
Rank l33t++
Rank
l33t++

You can put a "pause" statement on every line. That way you can see where it might go wrong 😉

Whats missing in your collections?
My retro rigs (old topic)
Interesting Vogons threads (links to Vogonswiki)
Report spammers here!

Reply 6 of 6, by rfnagel

User metadata
Rank Oldbie
Rank
Oldbie

Also, DOSBox doesn't support LFNs, or XCOPY, or "%userprofile%", etc... 😉

Rich ¥Weeds¥ Nagel
http://www.richnagel.net