• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Write file to client file system

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need to write a file to the client PC. I know javascript / html doen't usually have rights to do this, but I'm working on my company's intranet and in the IE trusted zone so I can use ActiveX components such as the FileSystemObject. I just can't get this working yet.

The file I'm copying is stored in a database and I usually access it to display it on a web page using a servlet (delivers it through a buffered output stream). I'm trying to do something like this:

fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CopyFile("http://serv:8080/app/getPic?PicID=46", "c:\\file.jpg");

The error I'm getting is "path not found" - I can only assume the fso can't access a URL to get a file.

Am I on the right track or am I barking up the wrong tree?
Any ideas anyone??

Thanks in advance,

Aidan


 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic