-
Notifications
You must be signed in to change notification settings - Fork 30
Rename WinSCPItem
Thomas Malkewitz edited this page Aug 9, 2019
·
14 revisions
Moves remote file to another remote directory and/or renames remote file.
Rename-WinSCPItem [-Path] <String> -NewName <String> [-PassThru] -WinSCPSession <Session> [<CommonParameters>]
Moves remote file to another remote directory and/or renames remote file.
PS C:\> Rename-WinSCPItem -Path NewWinSCPItem.txt -NewName RenameWinSCPItem.txt
PS C:\> New-WinSCPItem -Path NewWinSCPItem.txt -ItemType File
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 7/5/2017 12:14:55 PM 0 NewWinSCPItem.txt
PS C:\> Rename-WinSCPItem -Path NewWinSCPItem.txt -NewName RenameWinSCPItem.txt -PassThru
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 7/5/2017 2:26:09 PM 0 RenameWinSCPItem.txt
The new name for the item.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Output the WinSCP.RemoteFileInfo object.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The full path to the item to e renamed.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
It represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.