Create Folder or Directory

I would like a procedure to add to my ITarian Profile so that when I add an endpoint to a specific Profile this script will run to create a folder on the C drive; example: “C:\IT” where “IT” folder is created on root of C.

Out of interest, what is the folder used for?

I use it like a temp folder

I figured it out using my own script. The script to create a new directory from ITarian Scripts page (https://scripts.itarian.com/frontend/web/topic/script-to-create-a-new-directory) didn’t work for me. Maybe I just didn’t understand it even though I tried several different things to try to get it to create a folder, such as “Temp” on C:. I used this script and it worked. import os main_dir = “C:/Practice” os.mkdir(main_dir) print(“Directory ‘% s’ is built!” % main_dir)

I just use the run a powershell script and dump what I need inside that, cant be bothered learning python, or anytrhing else at this stage, busy enough as it is keeping up with client tasks.

eg

Create folder C:\ITfolder

$nfldr = new-object -ComObject scripting.filesystemobject
$nfldr.CreateFolder(“C:\ITfolder”)

mcfproservices