Jackson0 Posted January 24, 2009 Share Posted January 24, 2009 (edited) Hi,I have some problems with files that will not be moved or deletet. Files positions are correct.%AllUsersProfile%\Startmenü\Programme\Acronis\Acronis True Image Home" is a folder.{MAKEDIR} "%AllUsersProfile%\Startmenü\Programme\Brenn und Festplatten Tools"{FILEMOVE} "%AllUsersProfile%\Startmenü\Programme\Acronis\Acronis True Image Home" "%AllUsersProfile%\Startmenü\Programme\Brenn und Festplatten Tools\"will not moved into "Brenn und Festplatten Tools" folder. Foldername is correct! -------------------------------------------------------------------------------------------------------------------------------------------------------------------{DELETE} "%AllUsersProfile%\Desktop\Acronis Disk Director.lnk" will not be deletet, although there. Filename is correct!The problem seems with long filenames and spaces between the words.RegardsJackson Edited January 24, 2009 by Jackson0 Link to comment Share on other sites More sharing options...
johnhc Posted January 24, 2009 Share Posted January 24, 2009 Jackson0, please attach (not paste) your WPIxxx.log. The xxx will be a date/time stamp and the file will be in your root (usually C:\) directory. Enjoy, John. Link to comment Share on other sites More sharing options...
AlBundy33 Posted February 1, 2009 Share Posted February 1, 2009 I think this is more a problem of copy and move.To move startmenu entries I wrote a script which copies source to target and removes source.Are you sure that the Link on the Desktop is really a lnk-file? Sometimes the shortcuts are registry-keys (like recycle bin or network)You can try my script to move you startmenu-entries.You need sleep.exe (or remove the line with this command).You can call the script with move.cmd "Acronis" "Brenn und Festplatten Tools"It searches in %USERPROFILE% AND %ALLUSERPROFILE% and creates the target-dir if necessary.Al@ECHO OFFSETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSIONIF EXIST "%SYSTEMDRIVE%\SetWPIEnv.cmd" CALL "%SYSTEMDRIVE%\SetWPIEnv.cmd"SET SOURCE="%~1"SET TARGET="%~2"IF "%~3"=="" ( SET /A LOOPS=0) ELSE ( SET /A LOOPS=%~3)IF NOT "%OVERWRITELOOPS%"=="" SET /A LOOPS=%OVERWRITELOOPS%IF %SOURCE%=="" GOTO :HELPIF %TARGET%=="" SET TARGET=!CD!IF /I "%UNDOMOVE%"=="true" ( ECHO Tausche Quelle und Ziel um die Verschiebung rueckgaengig zu machen. SET CHANGE=%SOURCE% SET SOURCE=%TARGET% SET TARGET=%CHANGE% SET CHANGE=)IF %SOURCE%==%SOURCE:\=% ( CALL :WAIT "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%ALLUSERSPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" ) IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" )) ELSE ( CALL :WAIT %SOURCE% CALL :MOVE %SOURCE% %TARGET%)GOTO :END:WAIT SET FOUND=false :LOOP FOR %%X IN (%*) DO ( IF EXIST "%%~X" SET FOUND=true ) IF /I "%FOUND%"=="true" GOTO :NEXT IF %LOOPS% LEQ 0 GOTO :NEXT ECHO Warte bis Quelle existiert ^(%LOOPS%^)... "%~dp0sleep.exe" 1 SET /A LOOPS-=1 GOTO :LOOP :NEXT IF %LOOPS% LEQ 0 ( CALL :ERRORMSG "Quelle existiert nicht." GOTO :END ) GOTO :EOF:MOVE SET SRC="%~1" SET DEST="%~2" IF NOT EXIST %SRC% GOTO :END DIR /A:D %SRC% >NUL 2>NUL IF %ERRORLEVEL%==1 ( SET ISFILE=TRUE ) ELSE ( SET ISFILE=FALSE ) SET PARAMS=/V /I /F /G /H /R /Y IF NOT EXIST %DEST% MD %DEST% IF /I %ISFILE%==FALSE ( IF "%SRC:~-2,1%"=="\" SET SOURCE="%SRC:~1,-2%" IF "%DEST:~-2,1%"=="\" SET TARGET="%DEST:~1,-2%" FOR %%T IN (%SRC%) DO SET DEST="%DEST:~1,-1%\%%~nxT" SET PARAMS=%PARAMS% /E ) IF NOT EXIST %DEST% MD %DEST% XCOPY %PARAMS% %SRC% %DEST% IF NOT %ERRORLEVEL%==0 ( CALL :ERRORMSG "Es ist ein Fehler (ERRORLEVEL: %ERRORLEVEL%) aufgetreten." GOTO :END ) IF %ISFILE%==TRUE ( DEL /F /Q %SRC% ) ELSE ( RD /S /Q %SRC% ) GOTO :END:HELP ECHO.Anwendung: %~nx0 source [target] ECHO. GOTO :END:ERRORMSG ECHO FEHLER: %~1 GOTO :EOF:END ENDLOCAL Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now