#!/usr/local/bin/perl

open(STDOUT, ">output1.tmp");
system("dosdir");
close(STDOUT);

open(MYFILE, "output1.tmp");

while($a = <MYFILE>) {
	chop $a;
	@b = split(' ',$a);
	if (shift(@b) ne "Free") { system("dosdel $a"); } ;
}

close(MYFILE);

system("rm -f output1.tmp");