0

My task is to download files from the server using a .bat file. Now here is my problem:

I can download the files manually. Now i want to make it further automated, once i run the .bat file my jscript should run a loop searching for files with specific format (????_dd-MM-YYYY.txt).

Now this (????) is a prefix..i have comp_,faqs_ and so on.

I wanna move comp_ files to the Complaint folder. faqs_ to the Faq folder.( I think i can solve this part)

Now can someone guide me on how to find files with the specific format using jscript.( do i use regex?)

Any help would be wonderful

ps: I don't wanna use wildcards

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • possible duplicate of [javascript - check if string begins with something?](http://stackoverflow.com/questions/1767246/javascript-check-if-string-begins-with-something) – Helen Dec 11 '14 at 07:28

1 Answers1

1

look into "starts-with" (or maybe it is "startswith") method.

Marichyasana
  • 2,966
  • 1
  • 19
  • 20