Rename files on Windows devices
  • 17 May 2024
  • 1 Minute to read
  • PDF

Rename files on Windows devices

  • PDF

Article summary

The following PowerShell script helps the IT Admins to rename files on multiple managed Windows devices.

  1. Create a file on your desktop, for example, rename_files.ps1 and open it in a text editor like notepad++

  2. Copy the contents below to the file or click here to download the file.

    # Replace "Current and New" File name with the Exact Filename and path with the extension.
    
    rename-item  "current_filename_with_path.ext" "new_filename_with_path.ext"
  3. For example,

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

  4. Follow our guide to upload & publish the PowerShell script using Scalefusion Dashboard.

  5. Please make sure to select the Execution Policy as below

       a. Execution Level : Device

       b. Execution Context : Enrolled User

Please note that to use the PowerShell scripts, the Scalefusion MDM Agent Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.

Notes:
  1. Your The scripts and their contents are sourced from various albeit authenticated Microsoft sources and forums.

  2. Please validate the scripts on a test machine before deploying them on all your managed devices.

  3. Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.


Was this article helpful?