This Python script is designed to automatically clean your desktop by deleting all files and folders located on it. It can be called from the command prompt (cmd) and is intended to help you keep your desktop organized.
-
Create a folder named
utils
at the root of your C drive (C://). -
Save the Python script
clean_desktop.py
inside theutils
folder. -
Open the Python script
clean_desktop.py
using a text editor of your choice. -
Locate the line that looks like the following:
desktop_path = f"C:/Users/your_user/Desktop"
-
Replace
'your_user'
with your actual username. For example, if your username isjohn_doe
, the line should be changed to:desktop_path = f"C:/Users/john_doe/Desktop"
-
Save the changes to the
clean_desktop.py
file. -
Open the command prompt (cmd) on your system.
-
Navigate to the
utils
folder using thecd
command. For example:cd C:\utils
-
Run the script using the following command:
python clean_desktop.py
-
The script will start cleaning your desktop by deleting all files and folders. Be cautious and ensure that you have backed up any important data before executing the script.
-
This script will delete all files and folders on your desktop, including shortcuts. Make sure you have a backup of any important files before running the script.
-
The
clean_desktop.py
script will only delete the files and folders in the user's desktop folder. Ensure you are running the script with appropriate permissions and that the desktop folder is accessible. -
Use this script at your own risk. The developer is not responsible for any data loss or damage caused by the usage of this script.
-
For support or issues related to the script, please create an issue on the GitHub repository.
This project is licensed under the MIT License.