[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • 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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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