473,395 Members | 1,745 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,395 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 10418
<%
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.