Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # For Python 3.5.2
- from os import system, getcwd
- print("Microsoft Windows [Version 6.3.9600]\n(c) 2013 Microsoft Corporation. All right reserved.\n")
- system("title Command Prompt")
- directory = getcwd().split("\\")
- FinalDirectory = ""
- Cool = ""
- for i in directory:
- if ":" in i:
- drive = i
- while True:
- FinalDirectory = "cd \""
- Cool = ""
- for i in directory:
- if ":" in i:
- FinalDirectory += drive
- Cool += drive
- else:
- FinalDirectory += "\\" + i
- Cool += "\\" + i
- if FinalDirectory[-1] == ":":
- FinalDirectory += "\\"
- FinalDirectory += "\""
- command = input(Cool + ">")
- if command == "exit":
- exit()
- if command == "clear":
- command = "cls"
- if command[:3] == "cd ":
- if command == "cd" or command == "cd ":
- pass
- else:
- directory.append(command[3:])
- if command == "cd.." and len(directory) != 1:
- del directory[-1]
- print("")
- elif command == "cd..":
- print("")
- else:
- print()
- if len(command) <= 2 and command.endswith(":"):
- del directory
- directory = [command.upper(), ]
- drive = command.upper()
- print("")
- else:
- command = drive + " & " + FinalDirectory + " & " + command
- system(command)
- print("")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement