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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a Directory via VBA

Status
Not open for further replies.

mswilson16

Programmer
Nov 20, 2001
243
US
Does anyone know how to make a new directory through access. I have tried through a batch file but this is no good as the new directory needs to be made on what information is entered into a text field (which contains the path of the new directory).

Cheers

Wilson
 
Like this

MkDir ("C:\Whatever") There are two ways to write error-free programs; only the third one works.
 
Gholden,

That is exactly what I need.

By the way the message on the buttom of the post is ooh so true
 
The code that you have previously supplied is great and working a treat!

Do you know any other useful commands like the previous one.

i.e. how to copy files, delete files etc

More or less all the stuff that you can do in a batch file.

Cheers Wilson
 
You've got..

copy a file..
FileCopy source, destination

change path..
ChDir path

remove a directory..
RmDir path

delete files..
Kill pathname

There are a others such as Dir, to find out more type command in the code window highlight it and press F1.
There are two ways to write error-free programs; only the third one works.
 
What I need is a command that can copy a group of files to a different location. e.g.

copy all *.zip To A:
The Help files say about

FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"

Can someone please tell me how to get this to work?

Cheers

Wilson.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top