fmanager
v2.0.0
Published
cmd commands
Downloads
18
Maintainers
Readme
fmanager
This is a command line application that will help you to manage files and folders using the cmd
. With this tool you can be able to do a lot of files and folder manipulations like:
- creating a file
- creating a folder
- deleting a file
- deleting a folder
- renaming a file
- rename a folder
- etc
Installation
In order for you to use this package you need to install it globally as follows:
This package requires
Node.js
to be installed in your computer. And if you want to install it usingyarn
package manager you have to make sure thatyarn
is installed on your computer.
- using
yarn
yarn global fmanager
- using
npm
npm install -g fmanager
Usage
This is a command line application that is used to manipulate folders and files using the command line. You can run all the available commands which are listed bellow:
Available commands
- version
To check if the fmanager
has been installed on your computer you should run the following command:
fmanager -v
# or
fmanager --version
Note that this command will give you the currently installed version of the
fmanager
package. You can get a specific version by installing it globally as follows:
npm i -g fmanager@<version>
# example
npm i -g [email protected]
- creating a file
fmanager touch-file <filename>
# example
fmanager touch-file test.js
This will create a file called test.js
in the current directory.
- creating a folder
fmanager touch-folder <foldername>
# example
fmanager touch-folder test
This will create a folder called test
in the current directory.
- deleting a file
fmanager rm-file <foldername>
# example
fmanager rm-file test.py
This will delete a file called test.py
in the current directory.
- deleting a folder
fmanager rm-folder <foldername>
# example
fmanager rm-folder test
This will delete a folder called test
in the current directory.
- renaming a folder
fmanager rename-folder <old-foldername> <new-foldername>
# example
fmanager rename-folder test test1
This will renames a folder called test
to test1
in the current directory.
- renaming a file
fmanager rename-file <old-filename> <new-filename>
# example
fmanager rename-file test.js test1.ts
This will renames a file called test.js
to test1.ts
in the current directory.
- Listing files and folders
To list files and folders in the current working directory we have two commands which are:
fmanager ls
# or
fmanager dir
- Opening a file
To open a file with a default program you need to run the following command:
fmanager open <filename>
# example
fmanager open index.ts
The above command will open the file index.ts
with the default program.
make sure that the file exists in the current working directory.
Moving file or folders
Folders and files can be moved around teh file system by the fmanager using the following command:
fmanager move <filepath to be moved> <destination path>
# (can be absolute) (can be relative)
moving files/folders using relative path example:
fmanager move package.json .
moving files/folders using absolute path
fmanager move C:\Users\user\OneDrive\Documents\npm\index.js C:\Users\user\OneDrive\Documents\backend\src
- copying files
To copy file is similar to the moving of a file or a folder except that this command onl copy files not folders using the following command:
fmanager copy-file <filepath to be moved> <destination path>
# (can be absolute) (can be relative)
Example:
fmanager copy-file C:\Users\user\OneDrive\Documents\npm\index.js C:\Users\user\OneDrive\Documents\backend\src
- help
To get the docs or help from the fmanager
you run the following command:
fmanager -h
# or
fmanager --help
Installing specific versions
Specific versions of fmanager
can be installed globally by running the following command.
npm i -g fmanager@<version>
# example
npm i -g [email protected]
The command:
npm i -g fmanager
Will install the latest
version of fmanager
.
Facing problems
If you are facing any problem using this tool feel free to create an issue so that we can improve our tool.
Still working on
In the versions that will come we are going to allow the creation of recursive
files and folders for example creating files and folders using the following command:
# folders
fmanager touch-file test/unit/src
- this will create a nested folders like:
- test
- unit
- src
# files
fmanager touch-file test/unit/src/user.test.js
- this will create a nested folder and a file at the end like:
- test
- unit
- src
- user.test.js