Computing.Net > Forums > Disk Operating System > Finding a file using a BAT file?

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.

Finding a file using a BAT file?

Reply to Message Icon

Name: WeedHead
Date: December 15, 2000 at 17:09:39 Pacific
Comment:

Ok here is what i want to do.
I want to start a bat file and have it search the current directory for any SFV files. If it finds them i want it to execute D:\SFVcheck

Anyway to do this?



Sponsored Link
Ads by Google

Response Number 1
Name: WeedHead
Date: December 15, 2000 at 17:11:23 Pacific
Reply:

I mean it needs to execute
D:\SFVCheck.exe [THeFileIFound]


0

Response Number 2
Name: World Library
Date: December 15, 2000 at 19:05:33 Pacific
Reply:

The below is off the top of my head. Not to familiar with sfv as it proves to unreliable. (sorry)

Use the if exist statement. Be sure to alow if a sfv file is not found.

cls
@echo off
if exist c:\*.sfv goto check
:: above checks c
goto next
:check
d:
:check-d
sfv.exe
goto end
:next
if exist d:*.sfv goto check-d
goto ? next drive to be searched


0

Response Number 3
Name: ¤¤¥¤Ö
Date: December 16, 2000 at 04:12:58 Pacific
Reply:

Since you only want to search the current directory, you should not include an absolute path. I would try something like this:

for %%a in (*.svf) do D:\SVFCheck.exe %%a



0

Response Number 4
Name: Klick
Date: February 13, 2001 at 16:14:34 Pacific
Reply:

What about if you wanted to run the check on all *.SFV files in the directory including each sub directory? Or would that cause major problems?


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: Finding a file using a BAT file?

HELP Renaming files with a .bat file www.computing.net/answers/dos/help-renaming-files-with-a-bat-file-/3679.html

Sleep or pause in a Bat file www.computing.net/answers/dos/sleep-or-pause-in-a-bat-file/3137.html

Making a .bat file to get input NT www.computing.net/answers/dos/making-a-bat-file-to-get-input-nt/12892.html