Solved

Directory Search

Posted on 1998-09-17
3
142 Views
Last Modified: 2010-07-27
I am trying to go through a directory structure and copy all of the files in each directory.  I have it working so the files are copied but I can't figure out how to recursively search all of the directories.  
0
Comment
Question by:thorner
3 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1435447
This is cumbersome to program, simple for DOS.

SHELL( "XCOPY " & source & " /S /E " & target)

Also have ExecCmd that makes VB wait for child to finish before continuing.

Let me know if you want code to ExecCmd
0
 

Author Comment

by:thorner
ID: 1435448
I want to be able to do it through the GUI.  I just need to know how to go back a directory.  I'm getting to the last directory and getting stuck.  I've tried:
 dirPath.Path = dirPath.List(DirPath.ListIndex - 1).  Obviousely that's wrong but I don't know why.
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 50 total points
ID: 1435449
I have a project that recurses through a directory tree and displays it in a tree mode.  You could use this to go up and down the tree, doing what ever you can get away with to the files.  Email me at cymbolic@aol.com, and I'll send it to you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now