Skip to content

SPK1997/Command-Line-File-Handling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Handling Project

Click here to watch video of project's working.

What does project do ?

  • This project receives commands from user in command prompt and does file handling based on those commands.
  • Currently only text based files are handled but more file types can be added.

How to use the project ?

  • Make sure node.js is installed in your system. Installation Link

  • Open command prompt from the project root folder.

  • Type the command 'npm start' in command prompt and press enter.

  • The project will prompt you to Enter command. Check below points to find the command syntax.

  • Type your text based input command in the command prompt.

  • In the command which you type every separation is by one space only.

  • In all of the below commands ./ refers to root of your project folder. So ./files/info.txt means in the root of your project folder files is a folder named files and inside it info.txt is present.

    • create file command:
      create-file <file-path>
      Eg:- create-file ./info.txt

    • delete file command:
      delete-file <file-path>
      Eg:- delete-file ./info.txt

    • copy file command:
      copy-file <source-file-path> <destination-file-path>
      Eg:- copy-file ./info1.txt ./info2.txt

    • rename file command:
      rename-file <file-path-with-old-name> <file-path-with-new-name>
      Eg:- rename-file ./info1.txt ./info2.txt

    • append to file command:
      append-to-file <file-path> <some-content>
      Eg:- append-to-file ./info.txt hello world!

    • read from file command:
      read-from-file <file-path>
      Eg:- read-from-file ./info.txt

  • If all the above rules are followed then project will work as expected.

  • To stop the project. In the command prompt press ctrl + C on windows and cmd + C on mac.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published