Last active
June 13, 2016 09:11
-
-
Save feiss/fdbc59227c794fb80d2db0ceadcffdbe to your computer and use it in GitHub Desktop.
CDD in Powershell
This file contains 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
# usage: | |
# save this gist in a file call cdd.sh1 | |
# then, add a shortcut in the desktop or taskbar with the target: | |
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "& <full path to cdd.ps1>" | |
# | |
# When executed, type the folder name where you want to jump. Write "scan" if you want to refresh folder cache | |
$folder = Read-Host ' ' | |
if ($folder -eq 'scan'){ | |
echo '' > $Home\folders.txt | |
ls -R -Direc C:\ | foreach { echo $_.FullName} >> $Home\folders.txt | |
#add more drives like line above, in the priority order you desire | |
Exit | |
} | |
$paths= Get-Content $Home\folders.txt | Select-String $folder | |
start $paths[0] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment