473,569 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do we use the file system object to loop through a directory and refresh all the files?

I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
Thansk in advance.
Ajay
Jul 19 '05 #1
5 10423
<%
Dim FSO
Dim Fl
Dim Fls
Set FSO = CreateObject("S cripting.FileSy stemObject")
Set Fls = FSO.GetFolder(S erver.MapPath(" ./")) './ is the current folder

For Each Fl in Fls
Response.Write Fl.Name & "<br>"
Next

Set Fl = Nothing
Set Fls = Nothing
Set FSO = Nothing
%>
--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Ajay Garg <aj*****@hotmai l.com> wrote in message
news:d9******** *************** ***@posting.goo gle.com...
I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
Thansk in advance.
Ajay

Jul 19 '05 #2

Try this function out, it will return an single-dimensional array with
all of the file names.
http://www.coolpier.com/cp/cp_script....asp&view=code
Brynn
www.coolpier.com

On 13 Jan 2004 17:18:41 -0800, aj*****@hotmail .com (Ajay Garg) wrote:
I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
Thansk in advance.
Ajay


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #3

Would there be a way to get all hierachies and not only one level?

ralph

"Brynn" <z@z.com> wrote in message
news:40******** ******@news.com cast.giganews.c om...

Try this function out, it will return an single-dimensional array with
all of the file names.
http://www.coolpier.com/cp/cp_script....asp&view=code

Brynn
www.coolpier.com

On 13 Jan 2004 17:18:41 -0800, aj*****@hotmail .com (Ajay Garg) wrote:
I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
Thansk in advance.
Ajay
I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!
Brynn
www.coolpier.com

Jul 19 '05 #4
make the call recursive, having each subdir call the function again

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"spdl" <sp**@mosaic.ca > wrote in message
news:O4******** ******@tk2msftn gp13.phx.gbl...

Would there be a way to get all hierachies and not only one level?

ralph

"Brynn" <z@z.com> wrote in message
news:40******** ******@news.com cast.giganews.c om...

Try this function out, it will return an single-dimensional array with
all of the file names.

http://www.coolpier.com/cp/cp_script....asp&view=code


Brynn
www.coolpier.com

On 13 Jan 2004 17:18:41 -0800, aj*****@hotmail .com (Ajay Garg) wrote:
I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
Thansk in advance.
Ajay


I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com


Jul 19 '05 #5
Do you know about an example for this. Sounds rather complicated...

thanks

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:e2******** ********@TK2MSF TNGP11.phx.gbl. ..
make the call recursive, having each subdir call the function again

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"spdl" <sp**@mosaic.ca > wrote in message
news:O4******** ******@tk2msftn gp13.phx.gbl...

Would there be a way to get all hierachies and not only one level?

ralph

"Brynn" <z@z.com> wrote in message
news:40******** ******@news.com cast.giganews.c om...

Try this function out, it will return an single-dimensional array with
all of the file names.

http://www.coolpier.com/cp/cp_script....asp&view=code


Brynn
www.coolpier.com

On 13 Jan 2004 17:18:41 -0800, aj*****@hotmail .com (Ajay Garg) wrote:

>I wanted to loop through a directory and get the names of all the
>files in the directory and put it in a table using the file system
>object and VB scrip in a DTS package...
>
>
>How can Ido this?
>
>
>Thansk in advance.
>
>
>Ajay

I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com



Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8229
by: chris | last post by:
I'm writing a small app to help me learn more about cryptography. All it does is encrypt all of the files in directory A, and put the encrypted versions of the files in directory B. It then decrypts the files in directory B, and puts them in directory C. I'm getting some exceptions when I try to decrypt a binary file though. Here's the...
10
2453
by: Chris | last post by:
Hi, Not sure if this is the right forum, but hopefully someone can help me. I am creating something for our intranet and i want to list the files and folders of a directory, i found some code to do this. The only problem is that it lists the asp file used to for example if i go to: "http://myserver/listing.asp" In the file listing will...
5
1113
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up until the CDO.DropDirectory.GetMessages() method is called. At this point, the files are locked until I shut down the service. After processing and...
9
715
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit anyway).... Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) If e.ChangeType = WatcherChangeTypes.Created Then
13
4289
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I...
3
1904
by: Joe | last post by:
Hi, I have written a webpage that allows a user to delete files in asp.net with I am having a small problem. To access this page a user has to login via login.aspx page. After successful login, user is directed to a page called view.aspx which shows the user the files in a directory and allows them to delete the files. This page has a...
0
2547
by: troutbum | last post by:
I am experiencing problems when one user has a document open through a share pointing to the web site. I use the dsolefile to read the contents of a particular directory and then display them in a datalist. When the next user selects trys to run the page, the page fails and I get a generic error message from the stack trace. I am assuming...
4
4458
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use one of my webform pages which includes a button that pops up a window where you can upload files, if you upload files in this popup window, it...
4
6887
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the function creates the file as expected. When I loop through my array I get the error - "ArgumentException was unhandled - Illegal characters in...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.