/punch

file and folder management written in rust

Primary LanguageRustMIT LicenseMIT


Logo

punch

🗂️ file and folder management written in rust 📄

About punch 💡

It can be kind of easy to forget which bash command do what, for folder creation, we have mkdir, for files cat and touch and for deletion we have rm, and each of them has its own flags and ways to append multiple so why not just have one command do it all.

Name inspired by the touch command

commands:

📒 NOTE: all commands can't be joined together any number of times

  • ex: punch <flag(optional)> <file or directory_name> <file or directory_name> ...
  • punch ./folder1/ file1.txt file2.txt ./folder2 ./folder3 "to create multiple files and folders"

all directories must start with "./" and end with "/"

  • punch --help "to bring up help"
  • punch <file_name> "to create file"
  • punch -r <file1> <file2> "to rename a file"
  • 🔔(bonus)
      punch ./<directory_name>/ "to use without -dir flag"
  • punch -d <file_name> "or"  punch -d ./<directory_name>/ "to delete"
  • punch -in ./<target_directory_name>/ <file or directory_name> "creates files inside target directory"
  • punch -din ./<target_directory_name>/ <file or directory_name> "deletes files inside target directory"
  • punch -t <file or directory_name> "trashed the specified file or directory"
  • punch -m <file_name> ./<directory_name>/ "Moves the specified file to the specified directory"
  • punch -m <file_name> <number_of_moves> "Moves the specified file to the specified directory"
  • punch -l "Lists the sub-directories and files in the current working directory"

Built With

Rust Bash

Building from Source 🎁

  1. Clone the repo
    git clone https://github.com/spicylemonade/punch.git
  2. CD into the project
    cd ./punch
  3. Run the build script
    source build.sh
    or
     . ./build.sh

    For Windows ->

     ./build.ps1

{To top}

Examples

image

image

{To top}

contributions:eyes:

contributions are welcome, just fork and pull request