Jump to content

Recommended Posts

Posted

hi all i was just testing out my scripts in vmware and i came across this prob,, what it is, is that im trying to alter my start menu so it looks nicer and 1 prog gave me a strange prob and id like your advice on what i should do

first off im trying to move my link winamp.lnk to my audio players folder

heres my batch to move it and delete it after wareds

ECHO Moving ShortCuts...

XCOPY /Q "%USERPROFILE%\Start Menu\Programs\Winamp\Winamp.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\Audio Players"

ECHO.

ECHO Deleting Shortcuts...

RD /S /Q "%USERPROFILE%\Start Menu\Programs\Winamp"

ECHO.

EXIT.

now heres the error that poped up on me when i ran this script,, im not sure what to do, if i manually press D, everything works fine but how can i get around this , ive never came across this prob before


Posted (edited)

DOS could automatically copy it to file, without an extension. This would be incorrect for you, so it prompts for whether it is a file with no extension, or a folder. Just adding a backslash to your destination path, should inform DOS, that it is a folder. This will result in no prompt.

Edit:fix typo

Edited by MHz
Posted (edited)

Even easier, you don't need to premake the folder, just use the correct switches in your command

ECHO Moving ShortCuts...
XCOPY "%USERPROFILE%\Start Menu\Programs\Winamp\Winamp.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\Audio Players" /Y /I /Q

ECHO.
ECHO Deleting Shortcuts...
RD /S /Q "%USERPROFILE%\Start Menu\Programs\Winamp"

ECHO.
EXIT.

Edited by Yzöwl

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...