Hi All,
I am trying to rename a file through an web page. I currently use a form with a file input. On submit the code bbelow is called as a external asp page. I would like to rename the file or copy the file to a new location on the webserver with a prefix "a" or "1" etc. Is this possibble with the code below.
example file name
myfile.txt -> 1myfile.txt
<%
set fso = Server.CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFile(Request.Form("file1"))
f1.name = "1"&f1.name
Set f1 = Nothing
set fso = Nothing
%>
any help will be much appreciated. Thanks in advance
I am trying to rename a file through an web page. I currently use a form with a file input. On submit the code bbelow is called as a external asp page. I would like to rename the file or copy the file to a new location on the webserver with a prefix "a" or "1" etc. Is this possibble with the code below.
example file name
myfile.txt -> 1myfile.txt
<%
set fso = Server.CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFile(Request.Form("file1"))
f1.name = "1"&f1.name
Set f1 = Nothing
set fso = Nothing
%>
any help will be much appreciated. Thanks in advance