Skip to content

geoffrey1330/filecommander

Repository files navigation

File Commander

File Commander is a command-line tool for performing various file operations such as DELETE, COPY, MOVE,READ, SEARCH, LIST with the terminal.

Installation

To install File Commander, follow this Guide

Getting Repo

follow these steps:

  1. Make sure you have Go installed on your machine.
# Check Go version
go version

or visit https://go.dev/ to install Go on your local machine.

  1. Clone the repository or download the source code.
git clone https://github.com/geoffrey1330/filecommander.git
  1. Navigate to the project directory.
cd filecommander
  1. Run the following command to build the executable:
go build -o filecommander main.go search.go utils.go

This will generate an executable named filecommander.

Usage

File Commander supports the following commands:

Create

Create a new file.

filecommander create <filename>

Read

Read the content of a file.

filecommander read <filename>

Write

Write content to a file.

filecommander write <filename> <content>

Delete

Delete a file.

filecommander delete <filename>

List

List all files in a directory.

filecommander list <directory>

Copy

Copy a file to a new destination.

filecommander copy <srcfile> <destfile>

Move

Move a file to a new destination.

filecommander move <srcfile> <destfile>

Search

Search for files in a directory based on a given search term.

filecommander search <directory> <filename>

OR

filecommander search <directory> <filename extension>

Open

Open a file in the default editor.

filecommander open <filename>