Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Rename-NaFile


NAME
Rename-NaFile

SYNOPSIS
Rename a file.

SYNTAX
Rename-NaFile [-Path] <String> [-NewPath] <String> [-Controller <NaControlle
r>] [-WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Rename a file. The source and destination files must be fully qualified and
must reside on the same volume.


PARAMETERS
-Path <String>
Path of the file to rename, i.e. /vol/<volumename>/<filename>.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-NewPath <String>
New path of the file, i.e. /vol/<volumename>/<filename>.

Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


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 and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.Types.File.FileInfo


NOTES


Category: file
API: system-cli
Privilege: api-file-get-file-info, security-priv-advanced, cli-mv

-------------- Example 1 --------------

C:\PS>Rename-NaFile /vol/testvol3/file1.txt /vol/testvol3/file2.txt


Rename file1.txt to file2.txt.


Name Type Size Created
Modified Owner Group Perm Empty
---- ---- ---- -------
-------- ----- ----- ---- -----
/vol/testvol3/file2.txt file 10 B 12/15/2010
12/15/2010 0 0 1077



RELATED LINKS
Get-NaFile
Read-NaDirectory







 Data ONTAP® PowerShell Toolkit