File copy using javascript not Filesystemobject

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergio Otoya

    File copy using javascript not Filesystemobject

    Hi all,

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

    Any help would be greatly appreciated.

    Thanks in advance.

    Sergio Otoya.
  • HikksNotAtHome

    #2
    Re: File copy using javascript not Filesystemobjec t

    In article <3392f577.03080 21734.57d7b164@ posting.google. com>,
    sergio@winapp.c om.au (Sergio Otoya) writes:
    [color=blue]
    >Hi all,
    >
    >Is there any way of copying a file using javascript, not using the
    >Filesystemobje ct (ActiveX). I need this to run in Windows and MACS.
    >
    >Any help would be greatly appreciated.
    >
    >Thanks in advance.
    >
    >Sergio Otoya.[/color]

    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.

    Comment

    • Andrew Urquhart

      #3
      Re: File copy using javascript not Filesystemobjec t

      On 03 Aug 2003 09:03:37 GMT, HikksNotAtHome <hikksnotathome @aol.com> wrote:
      [color=blue]
      > In article <3392f577.03080 21734.57d7b164@ posting.google. com>,
      > sergio@winapp.c om.au (Sergio Otoya) writes:
      >[color=green]
      >> Hi all,
      >>
      >> Is there any way of copying a file using javascript, not using the
      >> Filesystemobjec t (ActiveX). I need this to run in Windows and MACS.
      >>
      >> Any help would be greatly appreciated.
      >>
      >> Thanks in advance.
      >>
      >> Sergio Otoya.[/color]
      >
      > No. Javascript has no access to the client file system. I assume you are
      > referring to client-side javascript.[/color]

      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.javas cript by Jim Ley at http://jibbering.com/faq
      - Archive at http://groups.google.com/groups?grou...ang.javascript

      Comment

      • Laurent Bugnion, GalaSoft

        #4
        Re: File copy using javascript not Filesystemobjec t

        Hi,

        Andrew Urquhart wrote:[color=blue]
        > On 03 Aug 2003 09:03:37 GMT, HikksNotAtHome <hikksnotathome @aol.com> wrote:
        >[color=green]
        >> In article <3392f577.03080 21734.57d7b164@ posting.google. com>,
        >> sergio@winapp.c om.au (Sergio Otoya) writes:
        >>[color=darkred]
        >>> Hi all,
        >>>
        >>> Is there any way of copying a file using javascript, not using the
        >>> Filesystemobjec t (ActiveX). I need this to run in Windows and MACS.
        >>>
        >>> Any help would be greatly appreciated.
        >>>
        >>> Thanks in advance.
        >>>
        >>> Sergio Otoya.[/color]
        >>
        >>
        >> No. Javascript has no access to the client file system. I assume you are
        >> referring to client-side javascript.[/color]
        >
        >
        > 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![/color]

        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.

        [color=blue]
        > Sergio:
        > No, unless you write your own plug-in![/color]

        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

        Comment

        • HikksNotAtHome

          #5
          Re: File copy using javascript not Filesystemobjec t

          In article <oprtb8nwj9km0o rm@news.btinter net.com>, Andrew Urquhart
          <reply.via@webs ite.in.sig> writes:
          [color=blue][color=green][color=darkred]
          >>> Is there any way of copying a file using javascript, not using the
          >>> Filesystemobjec t (ActiveX). I need this to run in Windows and MACS.
          >>>
          >>> Any help would be greatly appreciated.
          >>>
          >>> Thanks in advance.
          >>>
          >>> Sergio Otoya.[/color]
          >>
          >> No. Javascript has no access to the client file system. I assume you are
          >> referring to client-side javascript.[/color]
          >
          >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![/color]

          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 Filesystemobjec t". 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.

          Comment

          • Sergio Otoya

            #6
            Re: File copy using javascript not Filesystemobjec t

            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

            hikksnotathome@ aol.com (HikksNotAtHome ) wrote in message news:<200308031 84651.25815.000 01919@mb-m07.aol.com>...[color=blue]
            > In article <oprtb8nwj9km0o rm@news.btinter net.com>, Andrew Urquhart
            > <reply.via@webs ite.in.sig> writes:
            >[color=green][color=darkred]
            > >>> Is there any way of copying a file using javascript, not using the
            > >>> Filesystemobjec t (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.[/color]
            > >
            > >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![/color]
            >
            > 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 Filesystemobjec t". Can you post some code that uses pure
            > JScript/Javascript that can access my file system?[/color]

            Comment

            • Andrew Urquhart

              #7
              Re: File copy using javascript not Filesystemobjec t

              On 03 Aug 2003 22:46:51 GMT, HikksNotAtHome <hikksnotathome @aol.com> wrote:
              [color=blue]
              > In article <oprtb8nwj9km0o rm@news.btinter net.com>, Andrew Urquhart
              > <reply.via@webs ite.in.sig> writes:[color=green][color=darkred]
              >>>
              >>> No. Javascript has no access to the client file system. I assume you
              >>> are
              >>> referring to client-side javascript.[/color]
              >>
              >> 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![/color]
              >[/color]

              Replies inline:

              You said:[color=blue]
              > No, it doesn't. ActiveX does but JScript doesn't. It has access to an
              > ActiveX[/color]

              How is the above any different from the first sentence of my original
              reply, which said:[color=blue][color=green]
              >> JScript has access to the client file system ... with the help of
              >> ActiveX.[/color][/color]

              You said:[color=blue]
              > which *might* have access to the File System if I allow it but
              > javascript/jscript has no *direct* access to my files.[/color]

              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:[color=blue]
              > And the OP asked "not
              > using Filesystemobjec t". Can you post some code that uses pure
              > JScript/Javascript that can access my file system?[/color]

              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.javas cript by Jim Ley at http://jibbering.com/faq
              - Archive at http://groups.google.com/groups?grou...ang.javascript

              Comment

              Working...