
jr
Novice
Mar 10, 2000, 11:22 AM
Post #1 of 2
(1156 views)
|
Not Returning Directory List
|
Can't Post
|
|
I'm using an archive system to generate ZIP files of my entire site directory in an archive file, which then is auto-dl'ed to my computer...it works fine, given that it only backups files in the first directory. However, it does not open the sub-directories or archive what is in those directories, though it can SEE the sub-directories... Is maybe the following code off? <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> sub GetDirectories() { $last_part = split(/\//,$CGIDirectory); $this_cgi_directory = @_[$last_part-1]; $complete_List = `ls -l $TopDirectory`; @entryArr = split(/\n/,$complete_List); $i = 0; foreach $_ (@entryArr) { if((substr($_,0,1) ne "l") && (substr($_,0,1) ne "t"))# no symbolic links and not the total line { $number_of_columns = split(/ /,$_); if((@_[$number_of_columns-1] ne "Archive_It") && (@_[$number_of_columns-1] ne $this_cgi_directory)) { if($query->param(@_[$number_of_columns-1]) eq "T") { @dirArr[$i] = @_[$number_of_columns-1]; #print "@dirArr[$i]<br>"; $i++; } } } } } </pre><HR></BLOCKQUOTE>
|