From: "David Samuelsson (PAC)" <[EMAIL PROTECTED]> > i made a small script to clean out logfiles in a dir, actually its a > sub in a bigger script, but i get some toubles. Be carefull if you run > this script, cause it will delete files. It runs ok on files, but not > on directorys, my guess is that its because > i am on a win32 system? Also it looks like it translates the > structure as: > > d:\temp\huh/CME2_Course/EDU010_ClearCase/EDU010_Products_001.vbs/c > > where d:\temp\huh is base dir. That value actually comes from the > command line from Get::Opt. It doesnt work by doing d:/temp/huh > either.
The Perl builtins do not care whether there are forward or backward slashes in paths. What exactly do you mean by "doesn't work on directories"? 1) I believe rmdir() will only delete empty directories. 2) If you delete a file in a directory the -M seems to change. This means that if you just deleted some files from the directory it cannot be deleted because it seems to be as recent as it can get. 3) On the other hand if you modify a file in a directory the modification time of the directory stays intact. This means that you may only delete directories that are empty for at least N days. At least that's how it seems for me. Maybe you do not want to delete old directories, but empty ones. Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]