Coder Social home page Coder Social logo

searchfiles's Introduction

SearchFiles

This is a Python script with GUI to search for files and copy results to the clipboard.

This script is written on a Windows system, but should work on other operating systems.

Libraries used by the script that must be installed:

These libraries can be installed from the command line by using:

python -m pip install pyqt5
python -m pip install pyperclip
python -m pip install exifread
python -m pip install pillow

Or by using a package manager.

Running the script

The script can be run by calling Python:

"{python location}\python" "{script location}\SearchFiles.py"

If the script is used on more than one computer, a settings file can be created for each computer. The settings files are stored in the .app directory. For example, there can be an asus.json and an hp.json file for two computers.

An additional --settings argument can be used to specify the name of the settings file:

"{python location}\python" "{script location}\SearchFiles.py" --settings {settings file}

For example:

"c:\Users\username\anaconda\python" "c:\Users\username\github\searchfiles\SearchFiles.py" --settings asus.json

Creating a batch file on the desktop

Step 1. Create a batchfile

On windows, a .bat file can be created with the following content:

@echo off
"{directory where python is}\python" "{directory where the script is}SearchFiles.py" --settings {settings file}

Step 2. Create a shortcut to the batchfile

Copy the batchfile and paste it as shortcut on the desktop

Step 3. Modify the icon

Modify the properties of the shortcut:

  1. Ensure the target references the batchfile
  2. Ensure "Start in.." address references the directory in which the python script resides
  3. Click on the "Change Icon..." button and locate the .\.icons\icon_search_folder.ico file

Shortcut properties

Step 4. Rename the shortcut

Give the shortcut a useful name, such as "Search Files".

By now, the icon on the desktop should activate the script.

Desktop icon

It is possible to use the script on more than one computer, by creating differently named batchfiles and repeating the steps above on each computer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.