PDA

View Full Version : to create folder with date and time


sri
05-03-2006, 07:44 AM
I want to create a folder along with date and time when i tried it with the macro %DATETIME% i am getting an error

Error creating destination path 'C:\Programs\Executables\Exes_2006-05-03 6:17:36 PM\': The parameter is incorrect.

where Exes_2006-05-03 6:17:36 PM\
is the folder i want to create

how can i solve this problem?

kinook
05-03-2006, 09:02 AM
Windows does not allow : characters in filenames.
http://msdn.microsoft.com/library/en-us/fileio/fs/naming_a_file.asp

Use a date/time format that doesn't include such characters. You can use one of the system script function helpers.
http://www.visualbuild.com/Manual/sysscriptdatetime.htm

For instance:
[vbld_FormatDateEx(Now, "yyyy-mm-dd HH-MM-SS AP")]