Computing.Net > Forums > Disk Operating System > how to find a directory

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to find a directory

Reply to Message Icon

Name: jazzy
Date: October 31, 2003 at 14:07:41 Pacific
OS: windows 2000
CPU/Ram: pentium 4
Comment:

hi,

would you please show me how to write
a command in a batch file to find a
directory, e.g., wwwroot, in any
disk drive, then assign the full path
name to a variable.

tia,
jazzy



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: October 31, 2003 at 16:15:00 Pacific
Reply:

Hi jazzy
Try something like this, it worked in
WinXP Pro ok.

@echo off
dir /s | find /i "wwwroot" | find "Directory" > temp.txt
for /f "tokens=1,2,3 delims= " %%a in (temp.txt) do set Dir=%%c
echo %Dir%


0

Response Number 2
Name: jazzy
Date: November 3, 2003 at 16:01:37 Pacific
Reply:

thank you so much ! that works great !


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: how to find a directory

how to create a directory in dos www.computing.net/answers/dos/how-to-create-a-directory-in-dos/11381.html

how to rename a directory in DOS www.computing.net/answers/dos/how-to-rename-a-directory-in-dos/5381.html

How to install a CD-ROM from MSDOS www.computing.net/answers/dos/how-to-install-a-cdrom-from-msdos/4022.html