Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Rename or create a folder using the current date/ Now( )

I have some code that will generate a folder but I would like to add the current date to my newly created folder so I could create a new folder daily without altering the code.  Any help or ideas will be greatly appreciated.

 

Private Sub cmdMakeFolder_Click()
'Make a reference to the "Microsoft Scripting Runtime".  Then:

Dim fso As FileSystemObject

Set fso = New FileSystemObject
fso.CreateFolder "C:\Documents and Settings\user\Desktop\Test"
End Sub

0 Kudos
Message 1 of 2
(7,201 Views)
Well I figured it out on my own but thanks for looking.
 
 
 
fso.CreateFolder "C:\Documents and Settings\user\Desktop\Test" + Date$
 
 
 
The problem I was having was that the forward slashes in the Now and Date functions weren't allowed in the file name.  The error message threw me off.

Message Edited by pheepo on 09-14-2007 04:55 AM

0 Kudos
Message 2 of 2
(7,194 Views)