Category filter

Script to rename files on Windows devices

Management of files becomes easier if they are named sensibly. Hexnode lets admins to rename files on multiple devices simultaneously using scripts.

Note:


Supported Versions:

The scripts given below will be supported on the following versions:

  • Windows 10 v1607+ (Pro, Enterprise, Education)
  • Windows 11 (Pro, Enterprise, Education)


Disclaimer:

The Sample Scripts provided below are adapted from third-party Open-Source sites.

Batch Script

set “TargetPath=C:\Path\To\Your\Folder”

set “OldName=original_filename.ext”

set “NewName=new_filename.ext”

In the above command, replace the terms “C:\Path\To\Your\Folder”, “original_filename.ext”, “new_filename.ext” with actual path and names.

Script to rename files remotely executed successfully from Hexnode.

PowerShell Script

E.g., To rename the file test.txt in the Desktop of the user Deborah to testing.txt,

rename-item “C:\Users\Deborah\Desktop\test.txt” “C:\Users\Deborah\Desktop\testing.txt”

Notes:

  • Use quotes if the name has a space in between.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

Sample Script Repository