Computing.Net > Forums > Disk Operating System > Inputing to a Batch 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.

Inputing to a Batch file

Reply to Message Icon

Name: Jerry
Date: November 29, 1998 at 22:09:39 Pacific
Comment:

Hello!!!,

Ok here my problem. I'm trying to create a batch program that will moniter a drive looking for certain types of files. Then alert me of the files existance, and make a record of it. I need it to store the name and date of the file created. Can anyone help me?? If so Thank-you in advance.

Jer



Sponsored Link
Ads by Google

Response Number 1
Name: World Library
Date: November 30, 1998 at 15:06:26 Pacific
Reply:

Hmm.
Just a start:

cls
@echo off
if exist c:\stuff.dat goto uh_oh
goto end

:uh_oh
plany danger.wav
md badfile
copy C:\stuff.dat badfile
goto end2
:end2
echo file was found and copied to badfile
pause >nul
goto end3

:end
echo file was not found.

:end3
echo Have a super day!

What this will do is look for a file called
stuff on C: if it is found a directory called badfile is made and the file copied to the dir.

plany ........is a small dos wav player used in bats. Danger.wav is the wave that notifies you of the existence of the file.

Well it's astart......lol.

World Library


0
Reply to Message Icon

Related Posts

See More


I need Quick Basic Quickl... windows 2 dos



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: Inputing to a Batch file

pass a arg to a batch file www.computing.net/answers/dos/pass-a-arg-to-a-batch-file/6528.html

giving a path to a batch file www.computing.net/answers/dos/giving-a-path-to-a-batch-file/14784.html

Reading input from a batch file www.computing.net/answers/dos/reading-input-from-a-batch-file/13892.html