home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
flist58.zip
/
FLCOPY.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-02-26
|
831b
|
30 lines
@echo off
rem This is an example of how to implement a feature in FLIST that is not
rem directly supported. The function that we are implementing is
rem 'Copy within same directory to a different file'. This CMD file also
rem demonstrates how to use TJD Software's MLINE program to ask if an
rem existing file may be overwritten.
rem
rem To tell FLIST to run this command when the '1' key is pressed do:
rem SET $FUSR1$=%COMSPEC% /c FLCOPY $FN.$FE $P
rem
if .%1 == . GOTO Usage
if .%2 == . GOTO Usage
if .%3 == . GOTO Doit
GOTO Usage
:Doit
if EXIST %2 GOTO Prompt
GOTO DOCOPY
:Prompt
mline "File %2 already exists - Overwrite it?" Yes No
if ERRORLEVEL 1 GOTO End
:DOCOPY
copy %1 %2
GOTO End
:Usage
echo Usage is:
echo %0 file1 file2
rem Run MLINE with no arguments to set ERRORLEVEL
mline
:End