xcopy - Can sombody enlighten to why two of lines in batch dont work -


hi have following bat file works except lines 70 , 78 can help

tnx-

    @echo off  ; reseting system color configuration... @color 17  echo =============================== echo == autocad 2010 de mar setup == echo =============================== echo.  echo creating backup directory, please wait... echo.  mkdir c:\"autocad 2010 backup"  echo. echo autocad 2010 backup directory created... echo.  echo backing nessesary files, please wait... echo.  xcopy /s/y c:\"program files\autocad 2010\support\acad2010doc.lsp" c:\"autocad 2010 backup" xcopy /s/y c:\"program files\autocad 2010\support\acad.lsp" c:\"autocad 2010 backup" xcopy /s/y c:\"program files\autocad 2010\support\acad.pgp" c:\"autocad 2010 backup"  echo. echo nessesary files backed-up... echo.  echo deleting conflicting files, please wait... echo.  del c:\"program files\autocad 2010\support\acad2010doc.lsp" del c:\"program files\autocad 2010\support\acad.lsp" del c:\"program files\autocad 2010\support\acad.pgp"  echo. echo obsoleate files deleted... echo.  echo deleting old desktop shortcut, please wait...  del /s/q/f c:\"documents , settings\autocad 2010.lnk"  echo. echo obsoleate desktop shortcut deleted... echo.  echo refreshing desktop icons... echo.  rundll32 user32.dll,updateperusersystemparameters  echo. echo desktop refreshed... echo.  echo creating customised shortcut, please wait... echo.  cscript "c:\vbs\shortcut.vbs"  echo. echo customised shortcut created... echo.  echo deleting autocad 2010 startup icon, please wait...  echo deleating obsoleate de mar 2010 setup uninstall startup icon...  del /s/q/f c:\"documents , settings\%usersprofile%\menu start\programs\hendrika's autocad instellingen\uninstall hendrika's autocad instellingen.lnk"  echo. echo de mar 2010 setup uninstall startup icon deleted... echo.  echo copying uninstaal de mar 2010.bat new location...  xcopy /s/y/f c:\"bat\uninstaal de mar 2010.bat" c:\"documents , settings\%allusersprofile%\menu start\programma's\hendrika's autocad instellingen\"  msg * autocad 2010 setup sucesfully compleated, enjoy! 

to recap lines of concern are:

del /s/q/f c:\"documents , settings\%usersprofile%\menu start\programs\hendrika's autocad instellingen\uninstall hendrika's autocad instellingen.lnk" 

and

    xcopy /s/y/f c:\"bat\uninstaal de mar 2010.bat" c:\"documents , settings\%allusersprofile%\menu start\programma's\hendrika's autocad instellingen\" 

probably easiest thing put echo before both lines, like:

echo del /s/q/f c:\"docu ... 

and put a:

pause 

at end waits hit enter.

that should @ least show variable substitutions doing within script. think may find %allusersprofile% full path name , won't take kindly being injected middle of path:

c:\documents , settings\pax\my documents> echo %allusersprofile% c:\documents , settings\all users c:\documents , settings\pax\my documents> echo %userprofile% c:\documents , settings\pax 

i think it's userprofile way (singular), not plural usersprofile. @ least that's how on winxp box.

i think you'll able fix using:

del /s/q/f "%usersprofile%\menu start\programs\hendrika's autocad instellingen\uninstall hendrika's autocad instellingen.lnk" 

and:

xcopy /s/y/f c:\"bat\uninstaal de mar 2010.bat" "%allusersprofile%\menu start\programma's\hendrika's autocad instellingen\" 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -