View Single Post
Old 04-10-2007, 10:38 AM   #1 (permalink)
DaHLiA
Contributing Member
 
DaHLiA's Avatar
 
Join Date: 10-25-06
Location: India
Posts: 125
iTrader: 1 / 100%
DaHLiA is liked by many
Send a message via Yahoo to DaHLiA
General DOS Batch Files Query

Hi friends,

Hope everyone is having a happy time Well, I have two queries on the DOS Batch Files.

Query 1. Consider the scenario, there is a folder ABC containg 10 text files (notepad files) having names ONE.TXT, TWO.TXT, ... TEN.TXT
I want a batch file which can get me the output as:

Quote:
The first file in ABC is ONE.TXT
The second file in ABC is TWO.TXT
The third file in ABC is THREE.TXT
...
The tenth file in ABC is TEN.TXT
I dont mind having a echo statement for writing the words The first file in ABC is, The second file in ABC is, etc Because my ultimate aim is to learn how to get the contents of a particular folder one by one via BATCH files.

Query 2. I know START command is used to trigger any program like calc, etc in Batch files. Here the program CALC.EXE does not require any parameter. Say for example I have a utility which I normally use at the command line as

MyUtility C:\TEST\SAMPLE.CGF -H125

Dont be puzzled at the extension .CFG For the time sake let me tell you it is a window file. All I am doing by the above command is trying to expand the SAMPLE.CFG window horizontally by 125 percent and nothing else. Now my query is... this MyUtility has two parameters - one is the path of the window and two - the word "-H125".

How can I implement this using Batch file? START does not seem to work for me atleast
__________________
Cheers,
DaHLiA
___________________________________
My Virtual Shelter
“Knowing is not enough; we must apply. Willing is not enough; we must do.”
DaHLiA is offline   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links