-
-
Save SleepTheGod/b58c7640bb1dff92f658bf2f81da06ef to your computer and use it in GitHub Desktop.
Apricorn Padlock Keep-Alive
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
import os | |
import time | |
while True: | |
try: | |
os.mkdir('F:\\A') | |
print("Directory 'A' created.") | |
except FileExistsError: | |
print("Directory 'A' already exists.") | |
time.sleep(10) | |
try: | |
os.rmdir('F:\\A') | |
print("Directory 'A' removed.") | |
except FileNotFoundError: | |
print("Directory 'A' does not exist.") | |
except OSError as e: | |
print(f"Error removing directory 'A': {e}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment