(dir)
| 50 | # When we make a folder that already exist then WindowsError happen |
| 51 | # Changing directory may give WindowsError |
| 52 | def 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 | |
| 61 | ChangeDirectory(destLocation) |