diff --git a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md index 4c8e0a4858b6..6a297cd60f82 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md @@ -52,9 +52,6 @@ You can't use `Rename-Item` to both rename and move an item. Specifically, you c for the value of the **NewName** parameter, unless the path is identical to the path specified in the **Path** parameter. Otherwise, only a new name is permitted. -This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` -in the `D:\Archive` directory. The result is the error shown in the output. - ```powershell Rename-Item -Path "project.txt" -NewName "d:\archive\old-project.txt" ``` @@ -67,6 +64,9 @@ At line:1 char:12 stination "d:\archive\old-project.txt" ``` +This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` +in the `D:\Archive` directory. The result is the error shown in the output. + Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key diff --git a/reference/7.0/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.0/Microsoft.PowerShell.Management/Rename-Item.md index 7e6be1b47166..a97e47a636ce 100644 --- a/reference/7.0/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.0/Microsoft.PowerShell.Management/Rename-Item.md @@ -52,9 +52,6 @@ You can't use `Rename-Item` to both rename and move an item. Specifically, you c for the value of the **NewName** parameter, unless the path is identical to the path specified in the **Path** parameter. Otherwise, only a new name is permitted. -This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` -in the `D:\Archive` directory. The result is the error shown in the output. - ```powershell Rename-Item -Path "project.txt" -NewName "d:\archive\old-project.txt" ``` @@ -67,6 +64,9 @@ At line:1 char:12 stination "d:\archive\old-project.txt" ``` +This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` +in the `D:\Archive` directory. The result is the error shown in the output. + Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key diff --git a/reference/7.1/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.1/Microsoft.PowerShell.Management/Rename-Item.md index ab3b59db0b30..78a7a5dd22fd 100644 --- a/reference/7.1/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.1/Microsoft.PowerShell.Management/Rename-Item.md @@ -52,9 +52,6 @@ You can't use `Rename-Item` to both rename and move an item. Specifically, you c for the value of the **NewName** parameter, unless the path is identical to the path specified in the **Path** parameter. Otherwise, only a new name is permitted. -This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` -in the `D:\Archive` directory. The result is the error shown in the output. - ```powershell Rename-Item -Path "project.txt" -NewName "d:\archive\old-project.txt" ``` @@ -67,6 +64,9 @@ At line:1 char:12 stination "d:\archive\old-project.txt" ``` +This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` +in the `D:\Archive` directory. The result is the error shown in the output. + Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key diff --git a/reference/7.2/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.2/Microsoft.PowerShell.Management/Rename-Item.md index 4f6db54b36f8..e8210ad6ce90 100644 --- a/reference/7.2/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.2/Microsoft.PowerShell.Management/Rename-Item.md @@ -52,9 +52,6 @@ You can't use `Rename-Item` to both rename and move an item. Specifically, you c for the value of the **NewName** parameter, unless the path is identical to the path specified in the **Path** parameter. Otherwise, only a new name is permitted. -This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` -in the `D:\Archive` directory. The result is the error shown in the output. - ```powershell Rename-Item -Path "project.txt" -NewName "d:\archive\old-project.txt" ``` @@ -67,6 +64,9 @@ At line:1 char:12 stination "d:\archive\old-project.txt" ``` +This example attempts to rename the `project.txt` file in the current directory to `old-project.txt` +in the `D:\Archive` directory. The result is the error shown in the output. + Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key