Explore the docs »
Report Bug
·
Request Feature
To use cdf in the PowerShell command line you'll have to add FavoritesManager.psm1 to your modules and then import the module in the profile script, Microsoft.PowerShell_profile.ps1
-
Download FavoritesManager.psm1
-
Save it to
\WindowsPowerShell\Modules\FavoritesManager\FavoritesManager.psm1
. This is typically in eitherC:\Users\UserName\Documents\WindowsPowerShell\
orC:\Program Files\WindowsPowerShell\
SYNTAX
cdf [[-alias] <String>] [-add] [-remove] [-path] [-clear] [-list] [-open]
[<CommonParameters>]
-alias <String>
The name of the favorite you wish to perform a command on.
-add [<SwitchParameter>]
Switch for adding the selected alias (or name of current directory if none
is selected) to the favorites list
-remove [<SwitchParameter>]
Switch for removing the selected alias (or name of current dir if none
selected) from the favs list
-path [<SwitchParameter>]
Switch for returning the path that the selected alias points to. This has
higher priority than -list and nullifies list if selected
-clear [<SwitchParameter>]
Clears list of favorites if selected. Asks for user confirmation
-list [<SwitchParameter>]
Returns the favorites dictionary if selected. cdf -list is the same thing
as 'cdf' if no other commands are used
-open [<SwitchParameter>]
Opens up favorites.txt in notepad if selected
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
For more examples, type Get-Help cdf -detailed
in PowerShell to see the full documentation
PS C:\Users\Natalie\Pictures> cdf
Name Value
---- -----
code C:\Users\Natalie\code
Documents C:\Users\Natalie\Documents
GD C:\Users\Natalie\Google Drive
PS C:\> cdf code
PS C:\Users\Natalie\code>
PS C:\Users\Natalie\Pictures> cdf -add
PS C:\Users\Natalie\Pictures> cdf
Name Value
---- -----
code C:\Users\Natalie\code
Documents C:\Users\Natalie\Documents
GD C:\Users\Natalie\Google Drive
Pictures C:\Users\Natalie\Pictures
PS C:\Users\Natalie> cdf GD -remove
PS C:\Users\Natalie> cdf
Name Value
---- -----
code C:\Users\Natalie\code
Documents C:\Users\Natalie\Documents
Pictures C:\Users\Natalie\Pictures