Giter Site home page Giter Site logo

wandersick / enhanced-command-prompt-portable Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 128 KB

Based on Command Prompt Portable, ECPP enables PC enthusiasts, who bring a lot of portable utilities with them on a flash drive, to easily execute them by names or commands from a consolidated console without the need to remember where they are deep in the folder hierarchy.

Home Page: https://medium.com/wandersick/enhanced-command-prompt-portable-ecpp-6f1a8b94693d

License: GNU General Public License v2.0

Batchfile 58.81% NSIS 31.43% HTML 9.76%
command-line command-prompt sysadmin windows portable-utilities batch-script

enhanced-command-prompt-portable's Introduction

Enhanced Command Prompt Portable (ECPP)

Based on Command Prompt Portable, ECPP enables PC enthusiasts, who bring a lot of portable utilities with them on a flash drive, to easily execute them by names or commands from a consolidated console without the need to remember where they are deep in the folder hierarchy.

The Need to More Easily Execute Utilities within a Portable Collection

Do you use a lot of command line tools in your USB flash drive or cloud drive?

So, as an PC enthusiast, you probably have got a bunch of useful command line tools with you on the go. To use them, you first insert your USB flash drive (or establish cloud drive), start the command prompt on the target computer, navigate to your drive, then find out where your program is, cd to it and finally start it. However, you're always using them, and as the list of executables and subfolders grows, you start to wonder whether there's an easier way. Enhanced Command Prompt Portable (ECPP) to the rescue!

List of Features

  • Easily execute utilities within a portable collection by directly entering names or commands of the executables in Enhanced Command Prompt Portable (ECPP), eliminating the need to locate them or memorize where they are deep in the folder hierarchy
  • Displays a list of command line executables and folders placed inside CommandPromptPortable\Exe\ in the USB drive (or cloud drive)
  • Top-most executables are listed as file1.exe, file2.bat; folders are listed as [Folder1], [Folder2]...
  • PATH variable is automatically and dynamically updated on each run to detect new executables. (Alternatively, reload Command Prompt anytime by entering commandprompt)
  • Only folders with executables are appended to PATH to save space (configurable)
  • If utilities are grouped within folders, ECPP provides two subscripts, DirC.bat and ListC.bat, for listing executables in specified [folder(s)] to easily identify the names of the executables that can be run, e.g. listc linux windows (or dirc linux windows) would show all executables inside [linux] and [windows] folders
  • Display a welcome message when ECPP is run
  • Doesn't depend on a static location – portable usage or not – ECPP can be placed anywhere
  • Enhances upon Command Prompt Portable from PortableApps.com
  • Or, if no portability is demanded, merely replacing the Command Prompt is a valid use case as well!

Concept of ECPP – Enhanced Command Prompt Portable

Command Prompt Portable is another portable software from PortableApps.com. It provides us with a command prompt we can customize the way we want. One of the most useful customization is setting PATH to whatever locations we need. We simply edit a batch file called commandprompt.bat inside CommandPromptPortable\Data\Batch and set PATH to e.g. %~d0\[folder\_hierarchy]\Exe, ... where we put our executables. %~d0 will become the root of the USB drive (or cloud drive) automatically. Then we can use our commands right after we have opened Command Prompt Portable, no matter at which PC! So, instead of getting frustrated with the Command Prompt of a target computer, we can actually bring our own and have our settings on the go.

To go further, here's my customized take, known as Enhanced Command Prompt Portable (ECPP), with PStart as a launcher.

(The screen shot shown is non-English but the downloadable version is in English)

Available Utilities are Listed and Executable Eliminating the Need to Memorize Where They Are

For example, executables (.exe .bat .cmd .vbs...) put inside [CommandPromptPortable\Exe] folder are shown as file1.exe file2.bat, while folders are shown as [dir1], [dir2].

For me, I prefer to group my executables within folders as there're a lot of them. ECPP makes it such that as long as I remember the name of an executable inside any subfolder, I can type and run it without going into the sub-sub-subfolder. No more the need to edit the commandprompt.bat for each new folder. It achieves this by dynamically setting the PATH environmental variable to all subfolders that contain executables where ECPP command prompt is run each time.

An optional feature can be turned on so that only folders with executables inside will be appended to PATH, meaning PATH will be shorter, consuming less memory and searching faster if there are a lot of subfolders. However, the disadvantage is startup time being slower due to extra processing. To enable it, see commandprompt.bat /?.

The following illustrates the relationship between folders and PATH. Note the green line especially, while there are many folders inside UnxUtils, only [bin] and [wbin] are appended to PATH. That's because only those 2 folders contain executables.

Listing Utilities within Subfolders

OK. Utilities in subfolders are all handled by PATH now, but what if I don't remember the name of an executable at all? Then I would first need to see what's inside subfolders using Dirc.bat or Listc.bat which are a part of ECPP.

This is a sample output of what's inside [Microsoft] and [PnP] folders – listc Microsoft Pnp (listc is now deprecated; please use dirc below)

Alternatively, in dir /w style using Dirc.batdirc Microsoft Netcat

By default, only executables (defined as .exe .bat .cmd .vbs...) are shown.

Getting Started

  1. After downloading and extracting, put your executable files and folders into a folder named [Exe] (as shown in the below folder hierarchy of ECPP)
  2. Run ECPP. Observe that the executable files and folders are listed
  3. To find out what applications are inside sub-folders, query folder content using dirc folder_name
  4. Execute your applications by entering the filenames directly without the need to first cd into sub-folders
  "Command Prompt Portable" (base folder)
       |  
       |  CommandPromptPortable.exe
       |  
       ├─── Data
       |     └─── Batch
       |           └─── commandprompt.bat
       |                dirc.bat
       |                listc.bat
       ├─── Exe
       |     ├─── addswap.exe... (example)
       |     |
       |     ├─── Microsoft (example)
       |     └─── UnxUtils (example)
       |           └───...  
       |                └───...  
  • All scripts inside [Data\Batch] are ECPP customization
  • The download includes ECPP and a few third-party open-source CLI utilities for demonstration.

Release History

Ver Date Update MD5
TBC 20200704 Information update Refer to GitHub Releases
1.2a 20110105 Fixes an issue where the last character in PATH is stripped 5b234884461157d1b595dcfc6d6e2e22
1.2 20100103 Coding consolidation 0a57d4f1efc1152ccbb3eabd61032317
1.1 20090921 Original release 38d1bde4b9137fcf70d85f6033ec241c

enhanced-command-prompt-portable's People

Contributors

wandersick avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.