Is there a Python method to create directories recursively? I have this path:
/home/data/ with files 'table1.csv', 'table2.csv', ... , 'table1000.csv' in it
I would like to create: /home/data/table1 and move 'table1.csv' in it; /home/data/table2 and move 'table2.csv' in it; . . . /home/data/table1000 and move 'table1000.csv' in it;
The folder names would have to match the csv file names.
How can I do it recursively? I know os.makedirs() should probably be used not sure how it works exactly.
Many thanks.
NOTE: 'table1' and 'table2' etc are just dummy example file names. The real filenames are a bit complex.