Folder_Customization-Icons

Folder customization (Advanced)

The Python script takes a directory name as input. It then searches for suitable images (size = 256x256) related to the folder name on https://images.google.com/. The script downloads ‘n’ images (where n is a parameter, n <= 100), selects one randomly, and converts it into an .ico file.

The value of ‘n’ is customizable, but it’s important to note that a higher ‘n’ will increase the execution time, and the icons may or may not be appropriate for the folder, similar to the manual image search on Google.

The chosen image is converted to the .ico format and saved in the relevant subdirectory. Subsequently, it is applied as the folder’s icon.

Before:

alt text

After:

alt text

Folder customization (Basic)

In this process, the icons must be manually created and saved in their respective directory or subdirectory. The Python script is responsible for applying these pre-created icons to the corresponding folders.

Before:

alt text

After:

alt text

You can easily create a Windows Application (.exe) file by following the steps outlined on the website: https://mborgerson.com/creating-an-executable-from-a-python-script/.

To generate the executable, you can use the following commands:

pyinstaller.exe --onefile --windowed app.py
pyinstaller.exe --onefile --windowed --icon=app.ico app.py

Explanation of options:

For more details, you can refer to the LinkedIn post.