Link to home
Start Free TrialLog in
Avatar of techieguy
techieguy

asked on

Working with File Directory System in VB

I'm developing an application for a Datawarehouse project. I'm developing an OLE object that will read file name from specified location and return that filename. This filename would be used to automate the process. Can anyone help me out? I need someone who could help me in writing code in VB for doing this task

Thanks
Pradeep
Avatar of rspahitz
rspahitz
Flag of United States of America image

If you know the path and just need to find all files in there:

' This sends all files in a certain path to the immediate window
strFilename = Dir$(pathname) ' or & dir$(pathname & "\*.*")
while strFilename <> vbnullstring
  debug.print strFilename
  strFilename = Dir$
wend

ASKER CERTIFIED SOLUTION
Avatar of rspahitz
rspahitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pg_india
pg_india

Once i developed an application in Win95 to access the directoy structure of current window..sumthing like window explorer....may be this is what u r lokking for....

in vb add a reference of vb scripting object...then in general deceration

Dim filename As New Scripting.FileSystemObject.

I don't remember much of the coding but if u play with this object most probably ur query will be sloved....
Avatar of DanRollins
Hi techieguy,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept rspahitz's comment(s) as an answer.

techieguy, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer