Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate an array with file names from a specific folder

Status
Not open for further replies.

SSJpn

Technical User
Oct 7, 2002
259
US
I have a folder (C:\Files) with a bunch of .txt files in it. What i want is to first count how many files are in the folder (it will be constantly changing) and from that count make a dynamic array that will hold that amount of files. Then i want to fill the array with ONLY the file name WITHOUT the extension (ie if the file is called foo.txt i want the array to hold foo; NOT foo.txt)

I think i need to use the Count property of the files collection in order to see how many files i have but i dont know the syntax.
I also dont know the exact syntax to make a dynamic array... maybe ReDim test(5) or something?

anyways please help
 
Hey thats a great site JohnYingling.. but i can't seem to find the root of all the ASP stuff. Can you give me the link so that i can look up all the ASP objects and stuff that i want to look at?
 
Use SYNC TOC when you get to a page to get URL in Address box then save in favorites, copy etc.

MSDN Library / Web Dev / Scripting / Doc / Windows Script VBScript

MSDN Library / Web Dev / Server Tech / IIS
Compare Code (Text)
Generate Sort in VB or VBScript
 
yeah thats was i was talking about.. thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top