if AskAtBeginning = 'YES' | AskAtBeginning = 'Yes' then do
dopus request '"All Files in TrashDir"'|| '0a'x ||'"Will Be Deleted"'|| '0a'x ||'"Even If You Have Set The Date Control" OK|Cancel'
if RC=1 then Address Command 'Delete 'trashpath'#? all'
dopus front
end
end
Call DiskSpace
if freespace1 < 5120 then do
if (showdir(trashpath,'All'))~="" then do
dopus request '"WARNING!!!!!!! WARNING!!!!!!!"'|| '0a'x ||'"Global Trash Needs Alot Of Free"'|| '0a'x ||'"Harddisk space to work"'|| '0a'x ||'"Your selected Device have less than 5 Meg Free"'|| '0a'x ||'" I could Flush it for you???"'|| '0a'x ||'"It Will Delete all Files in Trashdir!"'|| '0a'x ||'"Free Disk Space= 'freespace'" OK|Cancel'
if RC=1 then Address Command 'Delete 'trashpath'#? all'
end
else
dopus request '"WARNING!!!!!!! WARNING!!!!!!!"'|| '0a'x ||'"Global Trash Needs Alot Of Free"'|| '0a'x ||'"Harddisk space to work"'|| '0a'x ||'"Your selected Device have less than 5 Meg Free"'|| '0a'x ||'"You should consider to select another device!!!!!!!"'|| '0a'x ||'"Free Disk Space= 'freespace'" OK'
end
/*- Delete files older than x Days ---------------------------------------------------*/
lister request handle '"Warning: You cannot get back"'|| '0a'x ||'"What you delete! OK to delete"'|| '0a'x ||'""'|| '0a'x ||'"Entries to delete:'entries'" Proceed|DeleteAll|Cancel'
if RC~=0 then do
LISTER SET arg1 newprogress name info bar
Lister set arg1 newprogress title "Deleting Files ..."
LISTER SET arg1 NEWPROGRESS INFO "Number of files: "entries
dopus request '"Syntax Error!!!"'lf'"---------------------"'lf'"line nr. 'signall'"'lf'"'comline'"'lf'"'err'"'lf'""'lf'"Waht will you do??" Save Log and Restart|Save Log Only|Restart Only|Cancel'
if rc=1 then do
call Open('log','Ram:ErrorReport','w')
writeln('log','Line nr. 'signal)
writeln('log',comline)
writeln('log',err)
close(log)
dopus request '"Report saved to Ram"'lf'"Will restart GDTrash" OK'