|
-
Jun 28th, 2000, 04:08 PM
#1
Thread Starter
Frenzied Member
There's no home for batch file questions 
anyway,
How do I loop through all the files in a directory and process them one at a time?
-
Jul 1st, 2000, 01:46 AM
#2
Member
in what
Are you programming in VB , QB or
something else?
-
Jul 3rd, 2000, 05:14 AM
#3
Thread Starter
Frenzied Member
-
Jul 3rd, 2000, 02:46 PM
#4
Member
hello loop
Sorry it took me so long to reply.
----------------------------------------
111.bat
---------------
@echo off
type Hello.txt' replace with file to loop(include path if not in same dir)(if file is exe just put the path)
222
222.bat
---------------
@echo off
type Hello.txt' replace with file to loop(include path if not in same dir)
111
Hello.txt
---------------
Hello
-----------------------------------------------------------
All files in dir eg.
111.bat
------------------
@echo off
c:\whatever\*.exe_____________(and, or *.com...)
c:\whatever2\222.bat
222.bat
------------------
@echo off
c:\whatever\*.exe
c:\whatever2\111.bat
Several years ago someone told me that anything
you can type on the command line, and works, you
can put in a batch file.
[Edited by catocom on 07-03-2000 at 04:32 PM]
-
Jul 4th, 2000, 02:27 AM
#5
Thread Starter
Frenzied Member
I don't think that is quite what I'm looking for.
If I was using VB I would use a FileList and do something like:
Code:
For i = 0 To File1.ListCount - 1
Shell "myexe " & File1.List(i)
Next i
I want to to the same sort of thing using a batch file
-
Jul 4th, 2000, 07:09 AM
#6
Thread Starter
Frenzied Member
Got it!
I don't suppose anyone is remotely interested but I just solved this for myself.
This might be NT only though.
This will "type" all .txt files inn the directory:
on the command line:
for %f in (*.txt) do type %f
or in a batch file:
for %%f in (*.txt) do type %%f
-
Jul 4th, 2000, 06:58 PM
#7
Member
It interest me
Sorry I wasn't more help.
A question was asked in General forum about
delaying windows. This could hold the key for
them too.(If used in autoexec)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|