Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

firekid

How to delete x days older folder

Here is a PowerShell script which can delete X days older folder. Can someone please write a script for WinSCP?
Get-ChildItem "folder path" -Recurse |
    Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-1))} |
    Remove-Item -Recurse -Force -Confirm:$false