Solved

How do I upload a file into another computer

Posted on 2004-08-30
7
232 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
  • 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
java continue statement 10 74
topping3 challenge 14 51
creating threads in delphi 1 55
Turning python script into an applet 12 43
Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now