Create windows directories structure from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I need some help. Is there a way to create directories structure on local or
network drive directly from Access?

Thanks
 
andrzejls said:
Hi,
I need some help. Is there a way to create directories structure on
local or network drive directly from Access?

Yes, assuming you have the necessary permissions. Check out the MkDir
statement in the online help. You probably won't find it unless you
check help from the VB Editor.

Note that you have to create each folder level in turn. You can
write -- or search to find already posted -- a function to make all
folders as necessary to create a path you specify.
 
Look in help for the FileSystemObject. It has many methods for
creating/managing folders.

Barry
 
Look in help for the FileSystemObject. It has many methods for
creating/managing folders.

Barry
 
Here's something I posted recently in reply to a similar question ...

Public Sub CreateAndRenameFolder()

On Error Resume Next

'careful with this - make sure
'you don't have folders with
'these names that you don't
'want to mess with.
RmDir "C:\TestFolder" ' - remove a folder
RmDir "C:\RenamedFolder" ' remove a folder

On Error GoTo 0
MkDir "C:\TestFolder" ' create a folder
Name "C:\TestFolder" As "C:\RenamedFolder" ' rename a folder

End Sub

Note that you can't create a parent folder and a child folder within that
parent if the parent does not already exist. In other words, you can't do
this ...

MkDir "C:\ParentFolder\ChildFolder"

.... If 'C:\ParentFolder' does not already exist. You have to do it this way
instead ...

MkDir "C:\ParentFolder"
MkDir "C:\ParentFolder\ChildFolder"
 

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

Back
Top