473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

copy file from local comp to server ?

1
Hello,
how can I copy a file from local disk to windows server using ASP (not
asp.net)?
I have a control file on my web side,
<input type="file" name="file1" />
I choose file on local computer and what function must I use to copy
this file to server ?

Thanks for any help.

Luk
Jul 1 '07 #1
1 1076
jhardman
3,406 Expert 2GB
This is a two-step process. First your form tag needs to specify the following enctype:[html]ENCTYPE="multipart/form-data"[/html]
and then you access that input as binary data rather than text.

Expand|Select|Wrap|Line Numbers
  1. request.binaryread(request.form("myFileInput"))
rather than
Expand|Select|Wrap|Line Numbers
  1. request.form("myFileInput")
this last code will only give you the file name.

I'm not sure how to save it, if it is a text file you can just save with a textstream using the scripting.fileSystemObject, but I'm not sure how to save it if it is binary data, although I would guess it is something similar. If anyone else knows, please respond.

Jared
Jul 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Somedude | last post by:
Hello, I am building a small page to copy files from our server(s) to our users local machines. It's very simple... (below, "f" is a mapped network drive) <?php $source_file =...
0
by: SeanR | last post by:
I have a function to copare two files. It will first copy the original file form a different server to a local temp path and then compare that version to a version that has been restored form tape....
4
by: oceanhai | last post by:
We currently have a PPTP connection set up for our developers to access our development SQL server through a VPN tunnel. When they need to copy tables up to the dev SQL from their local machine...
1
by: POnfri | last post by:
Hi, I have a problem in a peace of code were i'm doing a file copy using File.Copy. The Source is local and the target is a remote machine. Example: File.Copy(C:\temp\hi.txt,...
3
by: Johnny | last post by:
Hi, I have created an ASP.NET application (let's call it FooBar) with VS.NET on my local machine, residing in http://localhost/FooBar. Deploying it to another folder on my machine works well...
8
by: Paw | last post by:
Greetings. I use asp. what I need is is when a visitor comes to the site, I need it to check the host name. if "www.hometowndigest.com" is the host, then check a folder named "something" and if...
1
by: szaki | last post by:
Hello, how can I copy a file from local disk to windows server using ASP (not asp.net)? I have a control file on my web side, <input type="file" name="file1" /> I choose file on local computer...
5
by: Cliff72 | last post by:
Is there a way in VBA to copy a file from a web server to a local drive? Example: Every morning at 3AM a huge mainframe report is run and a copy of this report is saved as a text file on a web...
5
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello! I'm trying to copy a file from another computer on the network that I do not have permission with my current logon details to access. If I open the folder using the Windows file manager...
1
by: thanawala27 | last post by:
Hi, I have mapped a server to my computer (called it H drive). all my perl scripts run on the server. Now, i would like to copy a file from my local hard disk (C drive) to this server. As my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.