Create a folder with name generated automatically

M

Mike

I would like to make a procedure for a form which creates
a folder with automatically generated name. For example,
if the current date is January 08, 2003 and the current
time is 11:00, the folder should be named
as "c:\Backup\080120031100"
Is it possible?
 
V

Van T. Dinh

If you already have the parent dir "C:\BackUp", you can use:

mkdir "C:\BackUp\" & Format(Now(), "ddmmyyyyhhnn")

If you have got the parent dir, you need to create the parent dir first
(another mkdir).
 

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