Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Rename JournalTag

Nick Spreitzer edited this page Dec 21, 2019 · 7 revisions
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0

Rename-JournalTag

SYNOPSIS

Change the name of journal tag.

SYNTAX

Rename-JournalTag [-DryRun] -OldName <String> -NewName <String> [-Location <String>] [<CommonParameters>]

DESCRIPTION

Iterate though all journal entries that contain the specified OldName and replaces it with the provided NewName name. Use the -DryRun switch to generate a list of all entries that would be altered without actually making the changes.

EXAMPLES

Example 1

PS C:\> Rename-Tag -OldName cant-sleep -NewName insomnia -DryRun

EntryName
---------
2019.10.11
2019.10.31
2019.11.01

Displays a list of all entries currently tagged cant-sleep, without actually renaming the tags to insomnia.

Example 2

PS C:\> Rename-Tag -OldName cant-sleep -NewName insomnia

Finds all entries currently tagged cant-sleep and renames the tag to insomnia.

PARAMETERS

-DryRun

Generates a list of entries that would be altered by the command, without actually making the changes.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location

The root directory for the journal to search for entries. This is only required if no default journal location has been set, or to search a non-default location.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewName

The desired replacement name for the tag.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OldName

The name of the currently existing tag that should be renamed.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS