I am using Classic ASP to copy file from a server shared path to root folder of my application. When I use Server.MapPath()
to get the physical path it is showing the below error
•Error Type: Server.MapPath(), ASP 0214 (0x80004005) The Path parameter excedes the maximum length allowed.
The code I use is as below
Dim fs, f
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFile Server.MapPath(dirdefault + rs1("location")), Server.MapPath(location1)
Here dirdefault+rs1("location")
gives the shared path with filename. The number of characters coming for any 1 shared path is a maximum of 70 characters including spaces.
Kindly suggest an alternate way to copy files to my destination folder.
Maybe dirdefault+rs1("location") should be dirdefault & rs1("location") instead…?
User contributions licensed under CC BY-SA 3.0