home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Backup
/
Backup.zip
/
psnsg601.zip
/
RXDELTR.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-10-05
|
2KB
|
45 lines
/******************************************************************************/
/* */
/* (C) Copyright IBM Corporation 1997. */
/* */
/* DISCLAIMER OF WARRANTIES. The following [enclosed] code is */
/* sample code created by IBM Corporation. This sample code is not */
/* part of any standard or IBM product and is provided to you solely */
/* for the purpose of assisting you in the development of your */
/* applications. The code is provided "AS IS", without */
/* warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/* */
/******************************************************************************/
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
if 0 = RxFuncQuery( 'SysLoadFuncs' ) then
do
PathName = strip( arg(1) );
if length( PathName ) <> 0 then
do
PathName = strip( PathName, , '"');
CurrPath = Directory();
NewPath = Directory( PathName );
if translate( NewPath ) == translate( PathName ) then
do
call Directory substr( PathName, 1, 3 );
call SysFileTree PathName'\*.*', 'file', 'SFO', '*****', '**---'
do i=1 to file.0
say "Deletion of file "file.i" returned "SysFileDelete( file.i );
end
drop file;
call SysFileTree PathName'\*.*', 'file', 'SDO', '*****', '**---'
do i=1 to file.0
say "Deletion of directory "file.i" returned "SysRmdir( file.i );
end
say "Deletion of directory "PathName" returned "SysRmdir( PathName );
end
CurrPath = Directory( CurrPath );
end
end