I have a hard drive with files and folders ordered in this similar manner:
F:\folder1\folder\folder\file.rar
F:\folder1\folder\folder\file1.rar
F:\folder1\folder\folder\file2.rar
F:\folder2\folder\file.rar
F:\folder2\folder\file1.rar
F:\folder3\folder\file.rar
F:\folder3\folder\folder\folder\file.rar
I'd like to move all files in this drive to F:\\*\
, Rename if a duplicate filename is found, and recursively delete empty folders afterwards. There's just too many of these folders to find out how deep each parent directory is. After executing the batch script the folders should look like:
F:\folder1\file.rar
F:\folder1\file1.rar
F:\folder1\file2.rar
F:\folder2\file.rar
F:\folder2\file1.rar
F:\folder3\file.rar
F:\folder3\file (1).rar
There might be folders with files already inside the F:\\*\
level. I want them to stay where they are.
try this: