Do you mean like : win1_ win1_top_ win1_top_file_a win1_top_file_b win1_top_next_ win1_top_next_file_1 win1_top_next_file_2
So you want to delete win1_top_ and get everything under it deleted as well ? If so, then unfortunately, you can't. However, with a bit of coding, you can. You have to code up a routine that opens the directory and reads from it. For each entry where the name is not length zero if the file type is 255 (miracle hard disc, QPC and QXL 'hard' disc) then recurse into this as a directory end if delete the file (if it was a directory, it should be empty by now !) For an example of recursing down a directory tree form any given start point, see the source code for WinBack as available on Dilwyn's web site. This uses a procedure called check_dir - as shown below (it uses DJToolkit) to open and read from directories. (FOPEN_DIRECTORY, FREAD_DIRECTORY and END_OF_DIRECTORY). I'm sure you can extract the meat from the bones and get something useful from it. Cheers, Norman. 4745 DEFine PROCedure check_dir(d$) 4750 LOCal name_len%, curr_d$(40), curr_f$(41), entry$(64), loop 4755 LOCal qdos, err_loop, err1_loop, key(1) 4760 : 4765 REMark ** Process each directory entry in turn, ignoring nulls, ** 4770 REMark ** if a sub-directory is found, process it if required, if** 4775 REMark ** a data or program file is found then dump it to floppy ** 4780 REMark ** if it has been updated since the last archive was done ** 4785 : 4790 level = level + 1 4795 curr_d$ = d$ 4800 REPeat err_loop 4805 qdos = FOPEN_DIRECTORY(curr_d$) 4810 IF qdos < 0 4815 abandon qdos, 'Cannot open directory ' & curr_d$ 4820 ELSE 4825 EXIT err_loop 4830 END IF 4835 END REPeat err_loop 4840 directories = directories + 1 4845 update_tv 1 4850 REPeat loop 4855 IF END_OF_DIRECTORY(#qdos) THEN EXIT loop: END IF 4860 CURSOR_ON #main ! 4865 key = INKEY$(#main, 5) 4870 CURSOR_OFF #main 4875 IF key = escape 4880 aborted = 1: REMark ** Who pressed ESC then ? ** 4885 EXIT loop 4890 END IF 4895 IF key = SHIFT_F4 4900 show_title 4905 tv 4910 update_tv 1 4915 update_tv 2 4920 show_free_space 4925 END IF 4930 entry$ = FREAD_DIRECTORY$(#qdos) 4935 IF entry$ = '' THEN NEXT loop: END IF 4940 name_len% = word%(entry$(15 TO 16)) 4945 IF NOT (name_len%) THEN NEXT loop: END IF 4950 curr_f$ = curr_d$(1 TO 5) & entry$(17 TO (17 + name_len% - 1)) 4955 IF CODE(entry$(6)) = 255 4960 : 4965 REMark ** Sub-directory ** 4970 : 4975 IF do_subs 4980 : 4985 REMark ** Processing all sub-directories ** 4990 : 4995 check_dir (curr_f$) 5000 IF aborted THEN EXIT loop : END IF 5005 update_tv 1 5010 ELSE 5015 : 5020 REMark ** Not processing any sub-directories ** 5025 : 5030 NEXT loop 5035 END IF 5040 ELSE 5045 : 5050 REMark ** Data or program file ** 5055 : 5060 REPeat err1_loop 5065 file_size = FILE_length(curr_f$) 5070 IF file_size < 0 5075 abandon file_size, 'Cannot read header of ' & curr_f$ 5080 NEXT err1_loop 5085 END IF 5090 EXIT err1_loop 5095 END REPeat err1_loop 5100 files = files + 1 5105 t_file_size = t_file_size + file_size 5110 updated = FILE_update(curr_f$) 5115 archived = FILE_backup(curr_f$) 5120 update_tv 2 5125 IF (updated > archived) OR do_all 5130 : 5135 REMark ** File updated since last backup taken or ** 5140 REMark ** the user requested all files be archived ** 5145 : 5150 IF list_only 5155 f_archived = f_archived + 1 5160 lprint curr_f$ 5165 ELSE 5170 archive_file (curr_f$), (file_size) 5175 END IF 5180 ELSE 5185 : 5190 REMark ** File not changed since last backup taken ** 5195 : 5200 f_narchived = f_narchived + 1 5205 END IF 5210 END IF 5215 update_tv 1 5220 update_tv 2 5225 END REPeat loop 5230 CLOSE_DIRECTORY #qdos 5235 level = level - 1 5240 END DEFine check_dir ------------------------------------- Norman Dunbar Database/Unix administrator Lynx Financial Systems Ltd. mailto:[EMAIL PROTECTED] Tel: 0113 289 6265 Fax: 0113 289 3146 URL: http://www.Lynx-FS.com ------------------------------------- -----Original Message----- From: Michael Grunditz [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 3:39 PM To: [EMAIL PROTECTED] Subject: [ql-users] recursive delete Hi How do I do a recursive delete in qdos ? /Michael This email is intended only for the use of the addressees named above and may be confidential or legally privileged. If you are not an addressee you must not read it and must not use any information contained in it, nor copy it, nor inform any person other than Lynx Financial Systems or the addressees of its existence or contents. If you have received this email and are not a named addressee, please delete it and notify the Lynx Financial Systems IT Department on 0113 2892990.