473,408 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to read all text files one by one in a specified folder

How to read all text files one by one in a specified folder using msexcel vb editor
Jun 17 '10 #1

✓ answered by 9815402440

use following loop to get each text file
f=dir("*.txt")
do while f <> empty
'process files
f = dir()
loop

regards
Manpreet Singh Dhillon Hoshiarpur

3 3686
vb5prgrmr
305 Expert 100+
In the help files, look up the following...

FreeFile Function
Open Statement
Line Input Function
Input Function
Close Statement

You can also look these up on the web (vb6 freefile function, vb6 open statement,...) and at M$. However, at M$ you will need to filter through all of the .net cra...stuff.

Also, help files should have examples for you to look at along with the various web sources...



Good Luck
Jun 17 '10 #2
9815402440
180 100+
use following loop to get each text file
f=dir("*.txt")
do while f <> empty
'process files
f = dir()
loop

regards
Manpreet Singh Dhillon Hoshiarpur
Jun 18 '10 #3
@Manpreet...tnx a lot man...i had been pondering over it for 2 days..u r a lifesaver :)
Jun 18 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: raulgz | last post by:
Hi I need create, write and read text files in a procedure transac sql from sql server 2000 How i do this ?? Thanks,
8
by: Dave Moore | last post by:
I realize this is a somewhat platform specific question, but I think it is still of general enough interest to ask it here ... if I am wrong I guess I will find out 8*). As we all know, DOS uses...
5
by: gwarning! | last post by:
Goal: Have multiple text files, each of various lengths, be concatenated together into one final consolidated text file. Problem: Since the names of the files to be concatenated can change from...
5
by: Steffen Loringer | last post by:
Hi group, may be a simple question: How can I find out in C, which files of a specified extension exist in a specified folder? My app should constantly look for a file with an known extension...
3
by: Krish | last post by:
I have requirement, that i get one big chunk of text file. This text file will have has information, that on finding "****End of Information****", i have to split them individual text file with our...
1
by: Aries | last post by:
Hi I need to write programs to read a file and process it with C# in ASP. I need to use C# because other team members which will be joining our team are using C#. Can anyone please show me how...
1
by: Hutty | last post by:
I have a program that open text files and compares them, however, when reading files larger than 500kb the programs seems to bomb. I get re-directed to "page not found". Any idea how to get...
0
by: John | last post by:
I need to create an app to read text files and upload the data into SQL. The text files are in different format so I want to run a method based on the first line of my text files, 1. One of my...
1
by: sallu2000 | last post by:
hi to all, I am new to php,can u give any idea to read text file from folder based on datewise .for eg. in that folder there are three text file. one.txt 10/3/2007 two.txt 13/3/2007...
3
by: flavourofbru | last post by:
Hi, I have a question. I know how to read text files using ifstream. Now I would like to append some data at the end of the file. I read a text file as follows: #include "stdafx.h"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.