• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

BAT file to search a mapped directory

Hello,

I need to create a bat file that will allow a user to enter a name or part of a name and then have it search the mapped drive and open the result.

Is this even possible. I know search would do that, but I am looking for something faster.

Any ideas?
0
Plaintree_Systems
Asked:
Plaintree_Systems
1 Solution
 
leh327Commented:
@echo off
set /p filename="Enter name of file: "
set /p drive="Enter Drive (Q:, or Z:) to search for file: "

Rem assume that the user enter filename and drive correctly
%drive%
cd \
dir /b /s | find "%filename%"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now