Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

powershell delete files older than 15 days

Get-ChildItem "C:	emp" -Recurse -File | Where CreationTime -lt  (Get-Date).AddDays(-15)  | Remove-Item -Force
Comment

powershell how to delete files or folders last updated older than x days

Get-ChildItem -Path "C:Temp	emp" -Directory -recurse| where {$_.LastWriteTime -le $(get-date).Adddays(-10)} | Remove-Item -recurse -force
Get-ChildItem -Path "C:Temp	emp" -File -recurse| where {$_.LastWriteTime -le $(get-date).Adddays(-10)} | Remove-Item -recurse -force
Comment

PREVIOUS NEXT
Code Example
Shell :: change shell script to executable 
Shell :: clone a repository 
Shell :: du sort by size linux 
Shell :: bash how to print the list of files in a directory 
Shell :: snagit key code 
Shell :: git clone bare 
Shell :: how to autostart containers in ubuntu 
Shell :: how to upgrade package yarn global 
Shell :: how to copy file using ssh 
Shell :: deploy github actions with firebase 
Shell :: adapta ubuntu 
Shell :: check all background process in linux 
Shell :: update vs code ubuntu 
Shell :: git push empty folders 
Shell :: Merge Remote Repository With Local Repository in git command 
Shell :: pushing image to docker hub 
Shell :: pgadmin4 : Depends: libpython3.7 (= 3.7.0) but it is not installable 
Shell :: ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. 
Shell :: how to install phpunit 
Shell :: mongo activate 
Shell :: convert audio to mp3 with ffmpeg 
Shell :: linux run task in background 
Shell :: install wmctrl 
Shell :: check mtu size linux 
Shell :: how to git clone into a directory 
Shell :: Composer install with dockerfile 
Shell :: rmdir command 
Shell :: grep everything after a pattern 
Shell :: manjaro linux system information 
Shell :: install pip linux without root 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =