-3

I create this code that find for me all files that I have in folders, but I need that code to show me a full name of txt files (only txt) that string I insert there. For example: I insert "Alex" and it searching for all txt files that I have, and if it find it will give me a full name of txt file (example: "redme.txt")

What I need to change in my code?

this my code:
this my code

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • 2
    Are you asking people to do the work for you? If so, this is not a place to hire someone, but you may be interested in UpWork and similar sites. If not, please show us what you have attempted and explain the issues you are encountering. –  Mar 27 '18 at 21:38

1 Answers1

0

the question in the link below may give you the idea

How to get the first file with a .txt extension in a directory with nodejs?

First, try to get all files in a directory. Then, Sort out the .txt extensions. Next, compare the filename to the given string in the argument.

Devel JD
  • 35
  • 10
  • thanks! i never used at nodejs before and i not have Experience with this, for begging i must to start nodejs command prompt, choise location (where i want to do my project), and install "express -e ." and write the code in visual studio? – Alex Bliznichenko Mar 28 '18 at 10:57
  • If you are starting with Visual Studio, why not trying this https://learn.microsoft.com/en-us/visualstudio/ide/quickstart-nodejs – Devel JD Mar 29 '18 at 03:29
  • and u might find this one interesting: https://stackoverflow.com/questions/4351521/how-do-i-pass-command-line-arguments It's how u can take the argument from the command line. Hope it helps. – Devel JD Mar 29 '18 at 03:31