Copy all files and sub-directory under a specific directory

P

Phil

Hi,

I would like to create a button in a form to copy all
files with sub-directory from one directory to another
directory. The user will enter the the path of "from"
and "to". Is it possible?I found "FileCopy", "Kill", "RM
dir" but could not find any "Move" function in VB code (I
am using Access 97).

Thank you for your help.
 
J

john

i am john from Greece
You can do that but you will need to write many lines of VBA source code.
Use the FolderExists to check if source and destination folder is valid. If not, trap run-time errors by using "On Error Goto..."
Set a variable as object and use the CreateObject reserved method
[ Syntax: Set fs = CreateObject("Scripting.FileSystemObject"]
 

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