-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinfinite-folders.py
43 lines (36 loc) · 1.26 KB
/
infinite-folders.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# infinite directories
# by aaron montoya-moraga
# version 1.0.0: february 2017, stupid hackathon
# version 1.0.1: november 2017, compatible with python 3
# python script that generates infinite empty folders
#import system, string, modules
from os import system
import string
#clear the console
system("clear")
#get all of the ascii characters in lowercase
letters = string.ascii_lowercase
#initialize foldername as blank
foldername = ""
#function definition of makeFolders
#arguments are the current foldername and the ascii letters
def makeFolders(foldername, letters):
#for every letter
for letter in letters:
#append the current letter to the current foldername
foldername = foldername + letter
#build command to pass to the terminal
command = "mkdir " + foldername
#send the command to the terminal
system(command)
#print to the terminal the name of the just created folder
message = "created the folder " + foldername
print(message)
# infnite loop
while(True):
# for every letter
for letter in letters:
# append a new letter to the foldername
foldername = foldername + letter
# call to the function to create new folders
makeFolders(foldername, letters);