There\'s the script to re-create folder:
# Remove folder (if exists) with all files
if os.path.isdir(str(os.path.realpath(\'..\') + \"\\\\my_folder\")):
Create your python script file. In this case you may copy it in C:\WINDOWS\system32. The script file is creating a folder named "Smaog"
import os
os.chdir('C:/Program Files')
os.makedirs('Smaog')
Create batch file, at any folder you like.
echo off
title Renaming Folder
python sample.py
pause
Save the batch file. To run it, right click and choose Run as Administrator
Though you may choose to do this instead if you don't want to put your python script in C:\WINDOWS\system32. In your batch file, indicate folder/directory where your python script file resides.
echo off
title Renaming Folder
cd c:\Users\Smaog\Desktop
python sample.py
pause
Then run it as Administrator as explained just above.