| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
can we find a file in one folder?
|
Original Message
|
Name: mala_un
Date: July 27, 2006 at 20:19:34 Pacific
Subject: can we find a file in one folder?OS: Win XP/ Win 98/ FedoraCorCPU/Ram: Intel/ 512 MBModel/Manufacturer: dell / acer |
Comment: im running win 98 i'm running a batch file can be find a file inside one folder and copy into one file. let say.. ask user to enter filename.. check wether the file exist or not in C:\foldername.. if the file exist, copy into one new file.. if not, ask question again.. please help me.. thanks in advance
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Mechanix2Go
Date: July 28, 2006 at 15:42:02 Pacific
|
Reply: (edit)Try this: ::== m3.bat @echo off if not %1'==' goto :main echo filename? goto :eof :main if not exist C:\foldername\%1 goto :nofile copy C:\foldername\%1 newfile goto :eof :nofile echo %1 not found. try again :eof :: DONE
If at first you don't succeed, you're about average.M2
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home