consider following folder structure:
root
Folder1
file1.txt
file2.dat
Folder2
file3.doc
file4.pdf
rename.bat
I want to rename the files (using rename.bat) according to the name of the respective subdirectories, copy them to the root directory and delete the subfolders so that I get
root
Folder1.txt
Folder1.dat
Folder2.doc
Folder2.pdf
rename.bat
Actually I know this is possible (and actually with very few lines of code) since I already found the code somewhere some time ago. Sadly I lost my scipt and am not able to find the code again now.
Regards, Eduard