G
Grayscale
Hello,
I have two asp pages and try to get the folder & file name which is
selected on the first page but when I select any file and press submit,
it shows the folder as "C:\Windows\System32\-filename-" but I want to
show actual folder. When I use "text" as the input type, there is no
problem. Also I tried to use Request. Form method only but it shows
only the file name not the directory. So I decided to use
GetAbsolutePathName too. But it doesn't work for me. I'll be glad if
you help me to solve this problem.
--name1.asp--
<html>
<head>
<body>
<form action="name2.asp"
method="post">
Dosya ismi:
<input type="file" name="fname">
<input type="submit" value="Submit">
</form>
</body>
</head>
</html>
--name2.asp--
<html>
<head>
<body>
<%
dim fs, path, name
set fs=Server.CreateObject("Scripting.FileSystemObject")
name=Request.Form("fname")
path=fs.GetAbsolutePathName(name)
response.write(path)
%>
</body>
</head>
</html>
I have two asp pages and try to get the folder & file name which is
selected on the first page but when I select any file and press submit,
it shows the folder as "C:\Windows\System32\-filename-" but I want to
show actual folder. When I use "text" as the input type, there is no
problem. Also I tried to use Request. Form method only but it shows
only the file name not the directory. So I decided to use
GetAbsolutePathName too. But it doesn't work for me. I'll be glad if
you help me to solve this problem.
--name1.asp--
<html>
<head>
<body>
<form action="name2.asp"
method="post">
Dosya ismi:
<input type="file" name="fname">
<input type="submit" value="Submit">
</form>
</body>
</head>
</html>
--name2.asp--
<html>
<head>
<body>
<%
dim fs, path, name
set fs=Server.CreateObject("Scripting.FileSystemObject")
name=Request.Form("fname")
path=fs.GetAbsolutePathName(name)
response.write(path)
%>
</body>
</head>
</html>