Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmatically move a file from one folder to another 1

Status
Not open for further replies.

prover

Programmer
Joined
Sep 12, 2001
Messages
54
Location
US
Is it possible for Access to Programmatically move a file from one folder to another? In my case it wold be a .tif image.

Basically I have a folder with .tif images in it (approx 50 a day). What I need to do is automate placing each .tif image in its own folder. Each .tif image name is a nmuber ex: "101.tif" and each folder name will correspond to the .tif file name.

I don't have a problem creating the folders its actually moving (if I can) the .tif images.

TIA

Rich O
 

Use the Name function in VBA.

name "c:\import\101.tif" As "C:\101\101.tif"

You need to create the destination folder before executing Name. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Wow... quick and simple. :-)

Thanks, Terry!

--Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top