home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
jambtm02.exe
/
RM.BTM
< prev
next >
Wrap
Text File
|
1992-11-15
|
1KB
|
45 lines
*REM This batch file is Freeware, free to use and redistribute unmodified *
*REM Jouni Miettunen * jon@stekt.oulu.fi * Oulu * Finland * Europe * 1992 *
REM Unixish interface to del command
REM Timestamp 15-Nov-1992
break on^setlocal^unalias *^if %#==0 .or. "%1"=="-?" goto info^set arg=qy
REM Did the user give any arguments? Is it argument or a file?
if "%@ascii[%1]" != "45" .or. exist %1 .or. isdir %1 goto over
if "%2"=="" goto info
:optiot
set index=%@eval[%index+1]^set %@ascii[%@substr[%1,%index,1]]=1
if %index lt %@eval[%@len[%1]-1] goto optiot^shift
if "%[%@ascii[r]]"=="1" set arg=%arg%xsy
if "%[%@ascii[f]]"=="1" set arg=%arg%z
if "%[%@ascii[i]]"=="1" set arg=%arg%p
if "%[%@ascii[v]]"=="1" set arg=%@substr[%arg,1]
:over
if "%1"=="" goto end^set do=%1^gosub work^shift^goto over
:work
REM Note: verbose doesn't work for removing subddirs, but I don't know why..
del /%arg %do >&>nul || echo Error: cannot remove "%do"^return
:info
echo %@lower[%@name[%0]] [-options] file | directory ...
text
-f Force removal (hidden/read-only/system)
-i Interactive: ask permission before removing
-r Recursive removal (only normal files in subdirs)
-v Verbose: tell what's happening
-? Help
endtext
goto end
:end
break off^quit