[Solved] How to create folders and files from text file with same names to insert with corresponding name?

It doesn’t make any sense to generate text files and then folders to move the files to. Create the folders first place and create the files into the folders. Using a (code block) only one for loop is needed. @echo off setlocal for /f “tokens=*” %%a in (comps.txt) do ( if not exist “%%a” mkdir … Read more

[Solved] Replace a word in files and folders name

To settle the matter of the path I was only served in the string that the path of all this: “/wordthatwasreplacedinthenames/” with “/wordthat usedtoreplacethe old/” in this way has changed all the folders with the old word with the new one more as I put the two slash does not change the last folder that … Read more

[Solved] How can i delete multiple images from multiple folders using python [closed]

import os import random for folder in folder_paths: # Go over each folder path files = os.listdir(folder) # Get filenames in current folder files = random.sample(files, 900) # Pick 900 random files for file in files: # Go over each file name to be deleted f = os.path.join(folder, file) # Create valid path to file … Read more