Created
January 23, 2024 07:54
-
-
Save jakerieger/6d7b142ace149b7f57ca6736cf3ebe25 to your computer and use it in GitHub Desktop.
Symlink Tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import symlink | |
header = '''======================================= | |
| Windows Symlink Tool by Jake Rieger | | |
======================================= | |
''' | |
print(header) | |
def repl() -> None: | |
isDirStr = input("Directory (y/n)? ") | |
isDir = False | |
if isDirStr == "y": | |
isDir = True | |
srcDir = input("src > ") | |
destDir = input("dest > ") | |
print("\nSrc: {}\nDest: {}\n".format(srcDir, destDir)) | |
confirm = input("Confirm (y/n)? ") | |
if confirm == "y": | |
print("Creating symlink...") | |
symlink(srcDir, destDir, isDir) | |
print("Done.") | |
createAnother = input("Create another symlink (y/n)? ") | |
if createAnother == "y": | |
repl() | |
else: | |
exit | |
else: | |
exit | |
repl() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment