Moving Files Around

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I have a Access front end with MS SQL back end document manager
database. What I want to do is take a folder full of files named
[id].pdf and move them to a path within is a field in the database
based upon the [id] part of the file name. [id] is also a field in
the database. This seems as though it should be simple but I need to
do about 1000 per day in an efficient manner. Just wanted to get some
different ideas on how to do this. I would appreciate any
suggestions.
 
Brad said:
I have a Access front end with MS SQL back end document manager
database. What I want to do is take a folder full of files named
[id].pdf and move them to a path within is a field in the database
based upon the [id] part of the file name. [id] is also a field in
the database. This seems as though it should be simple but I need to
do about 1000 per day in an efficient manner. Just wanted to get some
different ideas on how to do this. I would appreciate any
suggestions.


I'm not sure I understand your post, but in principle you can move a file
using the Name statement in VBA:

Name "Old\Path\To\Filename.pdf" As "New\Path\To\Filename.pdf"

You can use variables or string expressions to specify the paths and file
names. If the target folder doesn't exist yet, you have to create it. You
can use the MkDir statement to do that. For details on how to do this based
on information that is stored in your database, you'll need to be clearer on
the tables and fields involved, and maybe give some examples of input data
and desired outcome.
 
Back
Top