Access renaming a file

N

notDave

Can anyone direct me to a sample line of code I can put in
a module that would copy a file from the C: drive and give
it a new name?

Something like;
ren (c:\test.txt, c:\test2.txt)

~notDave
 
N

notDave

How about copy?

And thanks for the tip in shellexecute, i'm looking at it
but all that error trapping is hiding the actual code :)

~notDave
 
D

Dirk Goldgar

notDave said:
Can anyone direct me to a sample line of code I can put in
a module that would copy a file from the C: drive and give
it a new name?

Something like;
ren (c:\test.txt, c:\test2.txt)

~notDave

FileCopy "C:\test.txt", "C:\test2.txt"
 
N

notDave

Great! Thanks!

Is there a layman's list anywhere of those?

MkDir
Name
FileCopy

etc?

~notDave
 
D

Dirk Goldgar

notDave said:
Great! Thanks!

Is there a layman's list anywhere of those?

MkDir
Name
FileCopy

etc?

It's in the online help, in the VB section. You should be in the VB
Editor when you open help, if you want to see these topics.
 

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