find files on hard drive from a list field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a need to move (or copy) certain files on my hard drive in a
particular folder into another folder. Not all files in that folder will be
moved/copied. I want to have only those files whose name is listed in a
field in a table moved. I know can do this one record at a time, but would
like it to be automated so that all files listed in that field are moved with
a single click.
I have no idea how to do this. Can anyone help.
 
You may want to follow the following steps:
1. put the list of files in a Access table.
2. open the table as a recordset, loop through each record and retrive the
file name, including the path.
3. open the folder where the files reside, loop through each file in the
folder, if the file name macth that from the recordset, move them, otherwise
ignore the file and move to the next file.

Hope this helps.
 
I already know the logic to use in the process. What I don't know is how to
perform step 3, especially the part of moving the file programmatically. I
know how to open a folder, but I don't want to be in the loop. I want the
program to do it all until it reaches an EOF.
 
Back
Top