By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

File copy using javascript not Filesystemobject

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.