< Back
Remove-LongItem
Post
NAME Remove-LongItem
SYNOPSIS
Deletes specified item.
SYNTAX
Remove-LongItem [-Path] <String> [-Recurse <SwitchParameter>] [-Force <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Remove-LongItem cmdlet deletes filesystem items.
PARAMETERS
-Path <String>
Specifies a path to the items being removed. Wildcards are NOT permitted. The parameter name ("-Path") is
optional.
Required? true
Position? 0
Default value
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Recurse [<SwitchParameter>]
Deletes the items in the specified locations and in all child items of the locations.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Allows the cmdlet to remove items that cannot otherwise be changed, such as read-only files.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<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).
INPUTS
System.String
OUTPUTS
None
This cmdlet does not return any output.
NOTES
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-LongItem -Path C:\\temp\\folder3\\drivers.txt -force
This command deletes a file that is read-only. It uses the Path parameter to specify the file. It uses the Force
parameter to give permission to delete it. Without Force, you cannot delete read-only files.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-LongItem -path C:\\temp\\folder7\\filenames -Recurse
This command deletes the folder 'filenames' including all files and sub-folders.
RELATED LINKS
SYNOPSIS
Deletes specified item.
SYNTAX
Remove-LongItem [-Path] <String> [-Recurse <SwitchParameter>] [-Force <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Remove-LongItem cmdlet deletes filesystem items.
PARAMETERS
-Path <String>
Specifies a path to the items being removed. Wildcards are NOT permitted. The parameter name ("-Path") is
optional.
Required? true
Position? 0
Default value
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Recurse [<SwitchParameter>]
Deletes the items in the specified locations and in all child items of the locations.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Allows the cmdlet to remove items that cannot otherwise be changed, such as read-only files.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<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).
INPUTS
System.String
OUTPUTS
None
This cmdlet does not return any output.
NOTES
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-LongItem -Path C:\\temp\\folder3\\drivers.txt -force
This command deletes a file that is read-only. It uses the Path parameter to specify the file. It uses the Force
parameter to give permission to delete it. Without Force, you cannot delete read-only files.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-LongItem -path C:\\temp\\folder7\\filenames -Recurse
This command deletes the folder 'filenames' including all files and sub-folders.
RELATED LINKS