VOGONS


Can't execute batch file

Topic actions

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 1 of 6, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I don't have access to DOSBox at the moment, but at which point does it freeze?

Reply 3 of 6, by collector

User metadata
Rank l33t
Rank
l33t

Your batch file is using XCOPY and you are trying to run it in DOSBox? As DosFreak said, why are you trying to run this in DOSBox?

Reply 4 of 6, by leileilol

User metadata
Rank l33t++
Rank
l33t++

Most importantly, why are you trying to use DOSBox to copy your Internet Explorer favorites links to a USB stick?

apsosig.png
long live PCem

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