473,224 Members | 1,368 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,224 software developers and data experts.

File copy using javascript not Filesystemobject

Hi all,

Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.
Jul 20 '05 #1
6 23712
In article <33**************************@posting.google.com >,
se****@winapp.com.au (Sergio Otoya) writes:
Hi all,

Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.


No. Javascript has no access to the client file system. I assume you are
referring to client-side javascript.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.
Jul 20 '05 #2
On 03 Aug 2003 09:03:37 GMT, HikksNotAtHome <hi************@aol.com> wrote:
In article <33**************************@posting.google.com >,
se****@winapp.com.au (Sergio Otoya) writes:
Hi all,

Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.


No. Javascript has no access to the client file system. I assume you are
referring to client-side javascript.


Hikks:
JScript has access to the client file system, as Sergio mentions, with the
help of ActiveX. It just doesn't automatically have it in IE's default
security configuration. It is this ActiveX control that "script kiddies"
utilise in their beloved email-borne "viruses". The only thing it can't do
is rename files (directly) or set access permissions on them, although if
you can get FSO to run in the first place you can probably get a shell
object running as well and do those things with the command line!

Sergio:
No, unless you write your own plug-in!
--
Andrew Urquhart
- http://www.andrewu.co.uk/clj.asp
- FAQ for comp.lang.javascript by Jim Ley at http://jibbering.com/faq
- Archive at http://groups.google.com/groups?grou...ang.javascript
Jul 20 '05 #3
Hi,

Andrew Urquhart wrote:
On 03 Aug 2003 09:03:37 GMT, HikksNotAtHome <hi************@aol.com> wrote:
In article <33**************************@posting.google.com >,
se****@winapp.com.au (Sergio Otoya) writes:
Hi all,

Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.

No. Javascript has no access to the client file system. I assume you are
referring to client-side javascript.

Hikks:
JScript has access to the client file system, as Sergio mentions, with
the help of ActiveX. It just doesn't automatically have it in IE's
default security configuration. It is this ActiveX control that "script
kiddies" utilise in their beloved email-borne "viruses". The only thing
it can't do is rename files (directly) or set access permissions on
them, although if you can get FSO to run in the first place you can
probably get a shell object running as well and do those things with the
command line!


To be totally exact: Client-side JScript does *not* have access to the
client file system. ActiveX, under certain conditions (relaxed security
environment) has access to the client file system, and JScript can,
under certain circumstances, script ActiveX components.

Sergio:
No, unless you write your own plug-in!


There is one way in Netscape, using the Java objects (java.io.File and
the likes). I am not sure, however, that it will work on Macintosh.

Laurent
--
Laurent Bugnion, GalaSoft
Webdesign, Java, javascript: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

Jul 20 '05 #4
In article <op**************@news.btinternet.com>, Andrew Urquhart
<re*******@website.in.sig> writes:
Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.


No. Javascript has no access to the client file system. I assume you are
referring to client-side javascript.


Hikks:
JScript has access to the client file system, as Sergio mentions, with the
help of ActiveX. It just doesn't automatically have it in IE's default
security configuration. It is this ActiveX control that "script kiddies"
utilise in their beloved email-borne "viruses". The only thing it can't do
is rename files (directly) or set access permissions on them, although if
you can get FSO to run in the first place you can probably get a shell
object running as well and do those things with the command line!


No, it doesn't. ActiveX does but JScript doesn't. It has access to an ActiveX
which *might* have access to the File System if I allow it but
javascript/jscript has no *direct* access to my files. And the OP asked "not
using Filesystemobject". Can you post some code that uses pure
JScript/Javascript that can access my file system?
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.
Jul 20 '05 #5
Thanks to everyone. That clears up a few things.

What would be the best option for copying a file from one location to
another that can work in Windows and in the Mac at the client side?.

In Windows, as you all rightly mentioned, I can use the activex FSO.
But what about the Macs? Is there an equivalent to ActiveX?. Some one
mentioned the java.io objects, are they freely avaialable in every
browser, by default? How do I call this library?.

Thanks again in advance for your help.

Sergio Otoya

hi************@aol.com (HikksNotAtHome) wrote in message news:<20***************************@mb-m07.aol.com>...
In article <op**************@news.btinternet.com>, Andrew Urquhart
<re*******@website.in.sig> writes:
Is there any way of copying a file using javascript, not using the
Filesystemobject (ActiveX). I need this to run in Windows and MACS.

Any help would be greatly appreciated.

Thanks in advance.

Sergio Otoya.

No. Javascript has no access to the client file system. I assume you are
referring to client-side javascript.


Hikks:
JScript has access to the client file system, as Sergio mentions, with the
help of ActiveX. It just doesn't automatically have it in IE's default
security configuration. It is this ActiveX control that "script kiddies"
utilise in their beloved email-borne "viruses". The only thing it can't do
is rename files (directly) or set access permissions on them, although if
you can get FSO to run in the first place you can probably get a shell
object running as well and do those things with the command line!


No, it doesn't. ActiveX does but JScript doesn't. It has access to an ActiveX
which *might* have access to the File System if I allow it but
javascript/jscript has no *direct* access to my files. And the OP asked "not
using Filesystemobject". Can you post some code that uses pure
JScript/Javascript that can access my file system?

Jul 20 '05 #6
On 03 Aug 2003 22:46:51 GMT, HikksNotAtHome <hi************@aol.com> wrote:
In article <op**************@news.btinternet.com>, Andrew Urquhart
<re*******@website.in.sig> writes:

No. Javascript has no access to the client file system. I assume you
are
referring to client-side javascript.
Hikks:
JScript has access to the client file system, as Sergio mentions, with
the help of ActiveX. It just doesn't automatically have it in IE's
default security configuration. It is this ActiveX control that "script
kiddies" utilise in their beloved email-borne "viruses". The only thing
it can't do is rename files (directly) or set access permissions on
them, although if you can get FSO to run in the first place you can
probably get a shell object running as well and do those things with the
command line!


Replies inline:

You said: No, it doesn't. ActiveX does but JScript doesn't. It has access to an
ActiveX
How is the above any different from the first sentence of my original
reply, which said:
JScript has access to the client file system ... with the help of
ActiveX.


You said: which *might* have access to the File System if I allow it but
javascript/jscript has no *direct* access to my files.
I didn't say it had direct access to your files and I did imply that it
needs non-default authorisation if it were to do so, hence the part omitted
in your quote where I said that if you can get FSO running you can probably
also get access to a shell as well.

You said: And the OP asked "not
using Filesystemobject". Can you post some code that uses pure
JScript/Javascript that can access my file system?


Why initiate a challenge like that? Point 1: I answered the OP and said no,
not without FSO (I did ponder LiveConnect as Laurent subsequently
suggested, but wasn't sure that that specific interaction was applicable
anymore).
Point 2: I haven't asserted that JScript can do it without ActiveX, rather
the contrary.

So, I'm rather surprised at what sounds like a flame. I'll give you the
benefit of the doubt and assume you were just having a bad day.

Best,
--
Andrew Urquhart
- http://www.andrewu.co.uk/clj.asp
- FAQ for comp.lang.javascript by Jim Ley at http://jibbering.com/faq
- Archive at http://groups.google.com/groups?grou...ang.javascript
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Andrew | last post by:
Hi, I want to copy a file from a variable location "C:\...\myDocument\thisfile.txt" to a destination D:\data\ How can I do that? I tried to get the path from <input tyep=file>, but I couldn't...
14
by: StumpY | last post by:
HI, I have set up a page with a form which appends data to a .csv file on my asp server, this is to enable a limited number of users to add news threads to this file, which contains the data in...
2
by: Steve | last post by:
OK, I know I can't read a file with JavaScript, but I see references that I can use the filesystemobject which is part of vb script. Can I embed vb script in HTML? I am writing a program for...
2
by: Ruskin | last post by:
I have developed an upload tool, that allows users to upload files (funny that). The asp form object has a 'SizeLimit' property that can be set, to prevent files being uploaded, that are too large....
2
by: JP SIngh | last post by:
Hi All I want to use ASP to copy a file from one folder to another. I am using the following code but it gives me a file not found error on the destination file name. All is want is 1. The...
3
by: David B | last post by:
I have this code to find a file, place it in C:\ temp, zip it up then send it to floppy in drive A:\. When I run it it comes up with error 53 - source file not found. However it gets as far as...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
1
by: novadoft | last post by:
hi, i am trying to use the fileSystemObject methods to read a picture file as a text (forcefully), store it in a variable, and then i try writing it back to a file and opening it up with a text...
6
by: Thanh-Nhan Le | last post by:
Hello, I have an ASP application on IIS server: http://localhost/myApp I use ASP and a my own VB activex DLL to create a pdf file and write this file to a subfolder of the Application folder:...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.