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 :: reset iptables ubuntu 
Shell :: ubuntu install webstorm 
Shell :: php curl ignore ssl certificate 
Shell :: database configuration spring boot 
Shell :: installing pytesseract in python linux 
Shell :: how to find empty directories in linux 
Shell :: how to kill port in linux 
Shell :: palindrome in shell script 
Shell :: ubuntu passwordless sudo 
Shell :: bash: /proc/sys/vm/drop_caches: Permission denied 
Shell :: ssh github generate key 
Shell :: Brew was unable to install [php@7.1]. 
Shell :: meteor installation 
Shell :: pycharm community install ubuntu 
Shell :: doctrine cache clear 
Shell :: chmod directory and subdirectories 
Shell :: java check java version 
Shell :: zsh create alias 
Shell :: python venv windows 
Shell :: docker compose down 
Shell :: mac kill port 8000 
Shell :: readline/readline.h: No such file or directory 
Shell :: check what ports are open linux 
Shell :: ubuntu bionic update security has sum mismatch 
Shell :: ubuntu delete user 
Shell :: ubuntu open directory from terminal 
Shell :: start cronjob 
Shell :: tail colored 
Shell :: find port and kill 
Shell :: convert crt to pem 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =