This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach($folder in Get-ChildItem) { | |
| if(Test-Path -PathType Leaf -Path "$folder.zip") { | |
| Write-Host "Skipping $folder" | |
| continue | |
| } | |
| Write-Host -NoNewline "Compressing $folder..." | |
| Compress-7Zip -Path "$pwd\$folder" -ArchiveFileName "$folder.zip" | |
| Write-Host "done" | |
| } |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 51417,-123.25197,44.971416 | |
| 55360,12.642866,42.546879 | |
| 55585,-76.160188,39.982201 | |
| 55536,-2.597938,51.450104 | |
| 55165,28.942675,41.035439 | |
| 51949,72.833672,18.94487 | |
| 55445,-1.897225,52.474335 | |
| 54432,-122.958577,38.504583 | |
| 55606,-124.25909,40.587797 | |
| 54815,12.395989,44.092597 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Get-Files { | |
| param ($path) | |
| Get-ChildItem -Path $path -Recurse | ForEach-Object { @{ Name = $_.Name; Full = "$($_.Directory.FullName)\$($_.Name)"; } } | Sort-Object -Property {$_.Name.Replace('[','').Replace(']','').Replace('-','').Replace(' ','')} | |
| } | |
| $herePath = "H:\Path\To\Copy" | |
| $therePath = $herePath -replace 'H:', 'T:' | |
| $here = Get-Files($herePath) | |
| $there = Get-Files($therePath) | |
| $longestHere = $($here | ForEach-Object { $_.Name } | Measure-Object -Maximum -Property Length).Maximum + 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach($file in Get-ChildItem -File) { | |
| $folderName = $file.CreationTime.ToString('yyyy-MM-dd') | |
| if (!(Test-Path -Path $folderName -PathType Container)) | |
| { | |
| New-Item -Path $folderName -ItemType Directory | |
| } | |
| Move-Item -Path $file -Destination $folderName | |
| } |
OlderNewer