home *** CD-ROM | disk | FTP | other *** search
- :*******************************************************************************
- : A 4LOGIC batch utility A free program. All of the code here is released
- : to the public domain.
- : Name: 4COPY.btm v. 1.0
- :
- : Author: Brad Owen
- :
- : Description: COPY files using pick-lists.
- :
- :*******************************************************************************
- @echo off
- cls
- pushd
- iff not exist %_boot:\4dirs.dat then
- cls
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- text
- Error message:
- 4dirs.dat was not found in the root of your boot drive.
- Run 4UD to create 4dirs.dat.
- endtext
- goto stop
- endiff
-
- :GETFROM
- cls
- scrput 8 6 %_fg on %_bg Choose a directory to COPY files FROM
- scrput 10 6 %_fg on %_bg ESC to quit
- scrput 12 6 %_fg on %_bg If you pick a floppy drive insert a
- scrput 14 6 %_fg on %_bg disk BEFORE pressing ENTER.
- set DIRFROM=%@select[%_boot:\4dirs.dat,0,55,22,80,─╢ Copy FROM ╟─]
- if "%DIRFROM"=="" goto stop
- if "%DIRFROM" == "A:" .OR. "%DIRFROM" == "B:" goto GETTO
- iff not isdir %DIRFROM then
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- cls
- echo 4COPY error: The directory you picked to copy files FROM
- echo.
- echo %DIRFROM
- echo.
- echo is not currently a valid directory on the system.
- echo.
- echo Remedy: Make sure the 4dirs.dat file is current by
- echo running the 4LDD utility.
- echo.
- pause Press a key to exit...
- goto stop
- endiff
- cls
- if "%DIRFROM"=="" goto stop
-
- :GETTO
- scrput 8 6 %_fg on %_bg Choose a directory to COPY files TO
- scrput 10 6 %_fg on %_bg ESC to quit
- scrput 12 6 %_fg on %_bg If you pick a floppy drive insert a
- scrput 14 6 %_fg on %_bg disk BEFORE pressing ENTER.
- set DIRTO=%@select[%_boot:\4dirs.dat,0,55,22,80,─╢ Copy TO ╟─]
- if "%DIRTO"=="" goto stop
- if "%DIRTO" == "A:" .OR. "%DIRTO" == "B:" goto FLOPFROM
- iff not isdir %DIRTO then
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- cls
- echo 4COPY error: The directory you picked to copy files TO
- echo.
- echo %DIRTO
- echo.
- echo is not currently a valid directory on the system.
- echo.
- echo Remedy: Make sure the 4dirs.dat file is current by
- echo running the 4LDD utility.
- echo.
- pause Press a key to exit...
- goto stop
- endiff
- cls
-
- iff "%DIRFROM"=="%DIRTO" then
- cls
- beep 350 2 400 2 350 2 400 2 350 2 400 2
- echo 4COPY error: The FROM and TO directories are the same.
- echo.
- echo Press a key to exit...
- goto stop
- endiff
-
- :FLOPFROM
- iff "%DIRFROM"=="A:" .OR. "%DIRFROM"=="B:" then
- iff "%@ready[%DIRFROM]"=="1" then
- goto FLOPTO
- else
- cls
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- echo 4COPY error: Drive %DIRFROM is not ready
- echo to copy files FROM.
- echo.
- echo Insert the disk and then
- pause Press a key to retry...
- goto FLOPFROM
- endiff
- endiff
-
- :FLOPTO
- iff "%DIRTO"=="A:" .OR. "%DIRTO"=="B:" then
- iff "%@ready[%DIRTO]"=="1" then
- goto CHANGE
- else
- cls
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- echo 4COPY error: Drive %DIRTO is not ready
- echo to copy files TO.
- echo.
- echo Insert a disk in %DIRTO and then
- pause Press a key to retry...
- goto FLOPTO
- endiff
- endiff
-
- :CHANGE
- cdd %DIRFROM
- iff not exist *.* then
- cls
- beep 400 2 350 2 400 2 350 2 400 2 350 2
- echo 4COPY error: %DIRFROM is an empty directory.
- echo.
- pause Press a key to exit...
- goto stop
- endiff
- select /A-S-D copy /R /V (*.*) %DIRTO\
- cls
- goto stop
- :stop
- cls
- set DIRFROM=
- set DIRTO=
- popd
-