HI Folks, I need to delete some directories, specified in removedir.txt, I'll like to check whether the file exists or not, if it doesn't I need to print file has been deleted. this is what I've done so far. use file::spec; use win32; chdir ("c://admin"); open (FILE1, 'c://admin//remove.txt') || die "can't open file he: $!\n"; sleep 2; while (<FILE1>) { # read file line by line. my ($user) = split /,/; #assign line output of file to line. chdir ('c://admin//test'); chomp $user; rmdir "/s /\q $user"; # system ('rmdir /s /q $user'); #system ('rmdir /s /q $user'); # remove directory # if (-d ) { # check if file exist: "please help me here" } print "Specified directory has been deleted \n"; sleep 2; } close FILE1 EOF ===== Peter Lemus Computer Networks Engineer [EMAIL PROTECTED] My Dad always tought me; when you do good; expect to receive good; when you do bad; expect the bad...sooner or later. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/