Results 1 to 3 of 3
  1. #1
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200

    MkDir command

    I'm using the MkDir command to create folders with VBA. It works well, and I'm checking to see if the folder exists. If it doesn't, I create it.



    Just want to make sure that I can't accidently overwrite a folder with this command. From what I've seen through testing, an error will pop up if I try to make a directory if it already exists. Just checking..

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    I think you are correct. If you attempt to MkDir a directory that already exists, an error is generated.
    Also, if I recall correctly, you can only doa MkDir at one level at a time. It's been a few years since I worked with this in Access, but I had to make things like C:\MyDir, then C:\MyDir\sub1\ in incremental steps.

    I did a quick google and found
    http://www.techonthenet.com/access/f...file/mkdir.php

    Good luck

  3. #3
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    but I had to make things like C:\MyDir, then C:\MyDir\sub1\ in incremental steps.
    Its been many number of years since I played with DOS commands but if I recall, that was how it was when you did this manually in DOS.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Mkdir to make multile folders from a query
    By Carouser in forum Programming
    Replies: 11
    Last Post: 08-15-2012, 12:36 AM
  2. mkdir basic help - create folder for each new record
    By hstroud38 in forum Programming
    Replies: 6
    Last Post: 03-28-2012, 04:30 PM
  3. PLEASE HELP Send Report to MkDir Path
    By alyon in forum Access
    Replies: 17
    Last Post: 12-06-2011, 05:56 PM
  4. Command Buttons
    By Rosier75 in forum Access
    Replies: 3
    Last Post: 03-09-2011, 11:59 AM
  5. Replies: 1
    Last Post: 07-27-2010, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums