0

I need to write a batch script to find a specific zip file path which is located some where in the system it may in

C:\ sub directories or D:\ sub directories

and have to set the path in a variable. please some one help me with this.

Thanks in advance.

sakthivel
  • 71
  • 2
  • 10
  • What have you tried, and how has what you've tried failed? Ideally, you should provide a [MCVE] of what you've tried, and include specific information on how it failed, with error messages and/or erroneous output. [SO] is not a code-writing service; the best questions are those which provide useful information so that those who answer can guide you to devising your own correct answer. See [Ask] a Good Question. – Jeff Zeitlin Jan 24 '18 at 12:48
  • I've tried `dir/s/b sample.zip > text_file.txt ` it searches for the file with in current directory and return the result in the text file , but I want to save the path in variable. and also want to search globally. – sakthivel Jan 24 '18 at 12:58
  • 3
    Possible duplicate of [How to store the result of a command expression in a variable using bat scripts?](https://stackoverflow.com/questions/1427218/how-to-store-the-result-of-a-command-expression-in-a-variable-using-bat-scripts) – Jeff Zeitlin Jan 24 '18 at 13:04

0 Answers0