Solved

How do I upload a file into another computer

Posted on 2004-08-30
7
237 Views
Last Modified: 2010-04-17
Hi all..
 
    I need to upload a file (.csv/.txt) from my computer to another computer? I have a set of codes here which will upload my files to my local drive. I've tried ammending the "Server.MapPath (uploads)....." codes to the IP address of another computer, however it doesnt work. Is there any way to solve this problem? I glad to accept any advices

My HTML codes (uploadData.asp)
==============================================================================
....................
<form name="uploadData" id="uploadData" method="post" encType="multipart/form-data" action="uploadFile.asp" onSubmit="return validate()">
  <p>
  <input name="File1" type="file" class="tdtext" id="File1">
</p>
  <p>    <br/>
    <input name="Upload" type="submit" class="tdtext" id="Upload" value="Submit" >
    <input name="clear" type="reset" class="tdtext"" id="clear" value="Clear">
.................
==============================================================================


My ASP codes
==============================================================================
<!--#INCLUDE FILE="include/clsUpload.asp"-->
<%


Dim objUpload
Dim strFileName
Dim strPath

' Instantiate Upload Class
Set objUpload = New clsUpload

' Grab the file name
strFileName = objUpload.Fields("File1").FileName

' Compile path to save file to
strPath = Server.MapPath("Uploads") & "\" & strFileName

' Save the binary data to the file system
objUpload("File1").SaveAs strPath

' Release upload object from memory
Set objUpload = Nothing
%>
File has been saved in file system.<BR>
<BR>
View this file:<BR>
<BR>
<A href="Uploads\<%=strFileName%>">Uploads\<%=strFileName%></A>
==============================================================================
0
Comment
Question by:jewel11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 7

Expert Comment

by:suramsureshbabu
ID: 11929250
in ASP while uploading we will be uploading the files to the server only.

to do what you are intending we can do a round about way

map the folder of the other system in your server and then point your asp file to upload the files to that folder.
hope it works and solves your problem
0
 

Author Comment

by:jewel11
ID: 11929286
How do i map the folder of another system in my server and pointing it to my ASP file?
0
 
LVL 5

Expert Comment

by:webtrans
ID: 11929289
what is the error  it gives you exactly
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 7

Accepted Solution

by:
suramsureshbabu earned 50 total points
ID: 11929326
open up network neighbourhood --> open the computer which you want to access --> open the filder which you want to map --> right click and say "map network drive"  --> give it a name
0
 

Author Comment

by:jewel11
ID: 11938151
Hi webtrans

   It does not give me any errors, when i attempt to upload the file into my local drive.. However, the error i got wen i changed the Server.MapPath to Server.MapPath("172.20.30.8/Uploads") & "\" & strFileName.. It gives me the following errors>.

ADODB.Stream (0x800A0BBC)
Write to file failed.

Y izzit so? i've already set the permission for my computer to write into the respective folder.
0
 

Author Comment

by:jewel11
ID: 11938367
To add on:

The codes to be workin using the Server.mapPath ("Uploads"), when i use the IP address of the other computer to upload the file. However when i use my localhost to upload files.. it fails.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question