473,320 Members | 2,158 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,320 software developers and data experts.

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 10416
<%
Dim FSO
Dim Fl
Dim Fls
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Fls = FSO.GetFolder(Server.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*****@hotmail.com> wrote in message
news:d9**************************@posting.google.c om...
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.comcast.giganews.com...

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**************@tk2msftngp13.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.comcast.giganews.com...

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_darkfalz.com> wrote in message
news:e2****************@TK2MSFTNGP11.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**************@tk2msftngp13.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.comcast.giganews.com...

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
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...
10
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...
5
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...
9
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...
13
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...
3
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...
0
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...
4
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...
4
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.