MCPcopy Index your code
hub / github.com/geekcomputers/Python / ChangeDirectory

Function ChangeDirectory

Organise.py:52–58  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

50# When we make a folder that already exist then WindowsError happen
51# Changing directory may give WindowsError
52def ChangeDirectory(dir):
53 try:
54 os.chdir(dir)
55 except WindowsError:
56 print("Error! Cannot change the Directory")
57 print("Enter a valid directory!")
58 ChangeDirectory(str(input("Enter the Path of directory: ")))
59
60
61ChangeDirectory(destLocation)

Callers 1

Organise.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected