in reply to Re: Removing files with extentions of log and date-time.
in thread Removing files with extentions of log and date-time.
Under Windows, the only files likely to do that are the directory aliases '.' and '..' -- and you don't really want to unlink those. Leave that line as is.
One reason your regexes in the version you posted weren't working, besides the unnecessary caret, was because you didn't have the alternation moen provided. First, you'd skip anything that didn't end it '.log'. Unfortunately, that rule excludes anything that ends in '.txt' or your date format.
In effect, the only thing left after that first rule would be '.log' files. Unfortunately, that wouldn't match the second rule, and no file would even make it to the third rule. So nothing was getting past those rules. (A file can't end in '.txt' and '.log' simultaneously.)
I hope this helps.
|
|---|