Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

find files on hard drive from a list field

0 views
Skip to first unread message

Isaac

unread,
Nov 19, 2007, 7:08:01 PM11/19/07
to
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.

chun

unread,
Nov 20, 2007, 3:45:01 PM11/20/07
to
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.

--
For the freedom in MS Office!

Isaac

unread,
Nov 20, 2007, 5:50:01 PM11/20/07
to
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.

Isaac

unread,
Nov 20, 2007, 8:17:01 PM11/20/07
to
I figured it out. No need to respond to this post. Thanks
0 new messages