0:00
I literally created 1000 folders just by using a simple python code about 10 lines so keep watching
0:10
so first of all we're going to import os module and now we're going to initialize a counter
0:17
from one and now we're going to simply run a while loop while i is less than or equal to 1000
0:23
so it's running now you need to specify the path where you want to have 1000 folders
0:31
so parenter equals to suppose i want to have those thousand folders inside of e-storage and then
0:40
there's a dump folder inside of it so that's it that's my path it is where i want to have
0:46
1000 folders in order from one to thousand and now simply i need to concatenate i and first of all
0:54
that would be type casted into a string and then that would be simply added to this path so that's
1:02
it now the next step is to simply increment the i value by one and now we're actually going to
1:09
check if that folder already exists in that specified path so if os.path.exists
1:17
exists and i'm going to provide the parent path here so then you simply need to
1:26
use a continue keyword which is basically going to skip the current iteration that's it and now
1:34
you simply need to create a folder so you have to use mkdir and then simply provide the parent path
1:43
so that's it guys here we go so it's time to run this code finally and see the result
1:53
and here's the output you can see these folders that starts from one and goes over to 1000 folders
2:02
in ascending order so that's all i got for you today guys thank you for watching if you
2:07
like the video give it a thumbs up subscribe for more i will see you in the next one