Category filter

Script to Create Files and Folders on Windows 10 devices

It is simple to create a file or folder on a device. However, creating files and folders on a large number of devices in a specified location becomes a time-consuming task. Hence, you can simplify this process on Windows devices by deploying custom scripts from Hexnode.

Disclaimer:

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

Create Files

Batch Script

Create a file after checking whether it already exists

Replace ‘filename‘ with a file name of your choice.

PowerShell Script

Create a file after checking whether it already exists

Replace ‘pc‘ with a file name of your choice.

Create Folders

Batch Script

PowerShell Script

Replace ‘test’ with a folder name of your choice.

Notes:

  • 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