Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have code which is written below.
Its working just copying website file to local machine, it works fine when I use it with a network computer, but if I us it with website it does not work.
I would like to copy website files into my local machine, the file extension is .csv.

Below is my code:
    <BODY >
    <script language="JScript">
    function copy()
var ss;
var name = '\\\\\\ks\\myfile\\ab.csv';
//var name = '';
var fl = new ActiveXObject("Scripting.FileSystemObject");
    Copying data from network and paste it into local.
    <form name="myForm" >
    <INPUT type="Button" value="Copy File" onload="copy();">

I am using the same code with two different files. First as HTML and 2nd as HTML application(.hta) both work the same, but when I use it online it does not work at all.

Given IP address is my local network machine.

This code is working in Internet Explorer, but not in Google Chrome and Firefox.

Please help me for that.

Thanks in advance.
Updated 2-Mar-12 23:47pm
André Kraak 3-Mar-12 5:47am    
Edited question:
Added pre tags
Formatted text/code

1 solution

If you use the Path property (App.Path), the ChDrive and ChDir statements, or the CurDir function, be aware that they may return a Universal Naming Convention (UNC) path (that is, one beginning with \\Server\Share...) rather than a drive path (such as e:\Folder), depending on how you run your program or project.

The Path should not be a url like ''.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900