Renaming an external file

R

rs0905

Is there a way to rename a file that is outside of a db? I have code where I
use .FoundFiles to locate files that match a string name. I'd like to be
able to rename the files that I find. These are text files, but the names of
the files do not end in .txt and I need them to in order to import them.

Thanks in advance!
 
R

rs0905

Spoke too soon....this isn't working. Do you think I'm missing a reference
or something?
 
D

Douglas J. Steele

What's the exact code you're trying to run?

What does "isn't working" mean? Are you getting an error? If so, what's the
error?
 
J

John Spencer

Name "c:\SomeWHere\MyFileName" as "c:\SomeWHere\MyFileName.txt"
Also take a look at the FileCopy command
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
R

rs0905

I was getting a compile error on the "Name" line of code - it wasn't being
recognized at all, which made me think that I was probably missing a
reference. But, the FileCopy command did the trick. Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top