Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| powershell_file_operations [2021/10/18 14:38] – created mgupton | powershell_file_operations [2022/02/23 17:45] (current) – mgupton | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| === Example of searching for files with cmd === | === Example of searching for files with cmd === | ||
| + | #search | ||
| < | < | ||
| cmd /r dir /s /b c: | cmd /r dir /s /b c: | ||
| </ | </ | ||
| + | |||
| + | <code powershell> | ||
| + | get-childitem .\ -recurse | where {$_.extension -eq " | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Delete file if exists and recreate it === | ||
| + | |||
| + | <code powershell> | ||
| + | $filename = " | ||
| + | </ | ||
| + | |||