home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
various
/
delete_all.amos
/
delete_all.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
1KB
|
44 lines
'
' This program will automatically delete any unwanted files.
'
' All you have to do is type in a path (and/or wildcard) eg. Df0:*.Bak
'
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' This program was written by Brett George
'
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Screen Open 0,640,256,2,$8001 : Colour 1,$EFF : Pen 1 : Curs Off
Set Dir ,""
Repeat
Print : Input "Please enter path - ";PATH$
If A$="" Then Edit
A$=Dir First$(PATH$)
If(A$="") or(Left$(A$,1)="*")
'
Else
A$=Right$(A$,Len(A$)-1)
For Z=1 To Len(A$)
Exit If Exist(Left$(PATH$,Instr(PATH$,"*")-1)+Left$(A$,Z))
Next
A$=Left$(PATH$,Instr(PATH$,"*")-1)+Left$(A$,Z)
Kill A$
Print "Deleting ";A$
End If
Do
A$=Dir Next$
If(A$="") or(Left$(A$,1)="*")
Exit
Else
A$=Right$(A$,Len(A$)-1)
Q=0
For Z=1 To Len(A$)
Exit If Exist(Left$(PATH$,Instr(PATH$,"*")-1)+Left$(A$,Z))
Next
A$=Left$(PATH$,Instr(PATH$,"*")-1)+Left$(A$,Z)
Kill A$
Print "Deleting ";A$
End If
Loop
Wait 100
Until PATH$=""
Edit