Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

apending date on end of copied folder.

Jan 14, 2006 2:21AM PST

Hi,

ASP VB

I'm having a brain spaz trying to get a variable to apend on the end of a URI

My code copies a folder/directory to another location on the server, no problem with that. I then want to add the date and preferably the time to the folder name (the copy).

I have this so far:

<code>
<%
dim fs,fo
getDate = Date()
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("\\myserver\domains\j\mydomain.net\user\htdocs")
fo.Copy("\\myserver\domains\j\mydomain.net\user\private\htdocs_" + ("getDate"))
set fo=nothing
set fs=nothing
%>
</code>

I realise my syntax for apending the date onto the htdocs foler name is wrong. Can anyone advise me of the correct syntax and also how to add the time on as well ?

Any suggestion much appreciated.

Discussion is locked