home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
warptape.zip
/
RXRESEAS.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1995-02-15
|
3KB
|
119 lines
/* Restore the entire file tree of the disk */
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
CALL SysLoadFuncs
CALL SysCls
SAY " "
SAY " "
SAY " WARNING!!!"
SAY " "
SAY " All EAs will be overwritten."
SAY " "
SAY " Press 'n' or 'N' to Cancel Backup."
SAY " "
SAY " Any other key to Continue."
CTRPAD = 80
HelpCheck = ARG(1)
if HelpCheck = '' then do
CALL SysCls
SAY " "
SAY " "
SAY " "
SAY CENTER('Usage: RXRESEAS [DriveLetter]', CTRPAD)
SAY " "
SAY CENTER('For example: RXRESEAS C', CTRPAD)
SAY ' '
SAY CENTER('See README.1ST file for more information', CTRPAD)
SAY ' '
SAY ' '
EXIT
END
Key = SysGetKey()
If Key = 'N' then DO
CALL SysCls
EXIT
end
If Key = 'n' then DO
CALL SysCls
EXIT
end
Select
when ARG(1) = "c" then
FromDir = "C:\EAS"
when ARG(1) = "C" then
FromDir = "C:\EAS"
when ARG(1) = "D" then
FromDir = "D:\EAS"
when ARG(1) = "d" then
FromDir = "D:\EAS"
when ARG(1) = "E" then
FromDir = "E:\EAS"
when ARG(1) = "e" then
FromDir = "E:\EAS"
when ARG(1) = "F" then
FromDir = "F:\EAS"
when ARG(1) = "f" then
FromDir = "F:\EAS"
when ARG(1) = "G" then
FromDir = "G:\EAS"
when ARG(1) = "g" then
FromDir = "G:\EAS"
when ARG(1) = "H" then
FromDir = "H:\EAS"
when ARG(1) = "h" then
FromDir = "H:\EAS"
when ARG(1) = "I" then
FromDir = "I:\EAS"
when ARG(1) = "i" then
FromDir = "I:\EAS"
Otherwise
SAY " "
SAY " "
SAY " ERROR!"
SAY " "
SAY " Drives beyond I not supported by this version."
end
/* Save current directory and change to [drive]:\temp */
CurDir = DIRECTORY()
NewDir = DIRECTORY(FromDir)
/* Read in the path and file names to restore */
DO FOREVER
PathOut = LINEIN(EADIR.LST)
IF PathOut = "" THEN LEAVE
ELSE DO
SlashPos = LASTPOS('\', PathOut)
WorkDir = DELSTR(PathOut, 1, (SlashPos - 1))
FileName = INSERT(FromDir, WorkDir)
EAUTIL Pathout FileName "/O /J /P"
END
END
CALL STREAM EADIR.LST, C, CLOSE
CALL DIRECTORY(CurDir)
CALL SysCls
SAY " "
SAY " "
SAY " Press Y to view successfully stored EA Files..."
SAY " "
SAY " "
key = SysGetKey(NOECHO)
PARSE UPPER VAR key key
if Key = 'Y' then do
DIR FromDir
end