Přidání příkazu MOVE do nižší verze DOSu II (soubor MOVE.BAT)

2. ledna 2012 v 16:51 | PiSoft |  Exsto
@ECHO OFF
if NOT EXIST C:\MV1.BAT goto FatalError
if NOT EXIST C:\GETKEY.COM MV1.BAT
if %1-==- goto Help
SET MVOTMP=
SET MBKD=
echo ------------------------------------------------------
if "%2"=="." goto NotImplementedC
if exist %1\*.* goto NotImplemented1
if exist %2 goto NotImplemented2
rem *.* ABC\
for %%a in (%1) do CALL MV1.BAT %%a %2 *!KEEP
if "%mvotmp%"=="abort" echo ABORTED!
if "%mvotmp%"=="backup" echo DONE & BACKUP (see %MBKF%)
set MVOTMP=
set MBKD=
SET MBKF=
goto fin

:NotImplementedA
echo !!! moving whole directory not implemented yet !!!
goto fin
:NotImplementedB
echo !!! alternating to REN command not implemented yet !!!
goto fin
:NotImplementedC
echo !!! moving from complex paths to shorter paths not implemented !!!
goto fin

:FatalError
echo [ERROR] Cannot work without C:\MV1.BAT.
echo ---------------------------------------
echo Check your MOVE.BAT setup package / disk
echo Check PiSoft / konikula@post.cz website
echo Terminated by fatal error
goto eof
:Help
echo [README]
echo MOVE.BAT and MV1.BAT are extension to DOS 4.1.
echo If used as replacement for MOVE of higher DOS
echo please consider renaming MOVE.BAT to BMOVE.BAT.
echo Keep in mind that both files are inseparable,
echo except if you need to keep just MV1.BAT.
echo - next -
pause>nul
echo Program MOVE is capable to check if target file
echo exist, and to offer basic user options for that
echo but also can make backups of target files.
echo - next -
pause>nul
echo Note that these backups are secure up to another
echo MOVE usage (in same folder). Best manner is to
echo check your files immediately when MOVE finishes.
echo In other words, when you used two MOVE.BAT comm-
echo ands with option "backup" in same folder, check-
echo ing your files after second MOVE can lead you to
echo visit backup folder (MVBAK$$$.TMP), where fatal
echo catastrophe only confirms. So please notice that
echo backup folder of each directory provides complete
echo reversability only for last MOVE above that dire-
echo ctory! Try to remember this always you go easy,
echo "because you have backup option".
echo - next -
pause>nul
echo MOVE.BAT, MV1.BAT, GETKEY.COM (c) PiSoft 2011
echo - close -
pause>nul
goto eof
:fin
echo [DONE] TIP: never ever delete MV1.BAT
:eof
 

Nový komentář

Přihlásit se
  Ještě nemáte vlastní web? Můžete si jej zdarma založit na Blog.cz.