This wonderful tool solves my long path issues. But i have two questions
1) You have a separate class for Directory and File. Say i have the directory 'Delete' (see code below) but i only want to delete files and folders within the Directory Delete. How can i do this, now it's deleting the whole directory.
2) It seems that adding powershell via a pipe doesn't work. I want to delete files older then 7 days (week), i've tried this: | Where {$_.lastwritetime -lt (Get-Date).AddDays($daysOld)}
Hi everyone,
This wonderful tool solves my long path issues. But i have two questions 1) You have a separate class for Directory and File. Say i have the directory 'Delete' (see code below) but i only want to delete files and folders within the Directory Delete. How can i do this, now it's deleting the whole directory. 2) It seems that adding powershell via a pipe doesn't work. I want to delete files older then 7 days (week), i've tried this: | Where {$_.lastwritetime -lt (Get-Date).AddDays($daysOld)}
Is there a solution to my questions.