| Server IP : 107.13.46.68 / Your IP : 216.73.216.232 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/linuxmint/common/ |
Upload File : |
#!/usr/bin/python3
import os
import sys
if __name__ == "__main__":
# Exit if the given path does not exist
if len(sys.argv) < 2 or not os.path.exists(sys.argv[1]):
print("No argument or file not found")
sys.exit(1)
path = sys.argv[1]
dpath = f"{path}.desktop"
if not os.path.exists(path):
if os.path.exists(dpath):
path = dpath
else:
print("Path not found", path)
sys.exit(1)
os.remove(path)