created the base concept of the script

This commit is contained in:
2025-09-26 20:28:47 +02:00
parent 322d29d044
commit 6911d4d574

19
tempbox/tempbox.py Normal file
View File

@@ -0,0 +1,19 @@
import tempfile
import os
def create_folders(number_folders, base_path):
"""creates an amount of folders and returning its path"""
while number_folders > 0:
number_folders = number_folders - 1
folder_name = f"folder_{number_folders}"
full_path = os.path.join(base_path, folder_name)
os.mkdir(full_path)
print(f"'{full_path}' was created")
# Creates a temporary directory.
with tempfile.TemporaryDirectory() as temp_dir:
print(f"Folderpath: {temp_dir}")