• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1032
  • Last Modified:

JavaScript to unzip a zipped file transferred by FTP to a remote server

Experts, please

My app uploads to a remote folder multiple files by FTP.

I would like to zip these into one file, upload the one file, and then have the one file unzip automatically while preserving the folder structure.

Please can experts  suggest a JavaScript strategy for the automatic unzipping within the remote folder?

Thanks

Gordon
0
Gordon_Atherley
Asked:
Gordon_Atherley
  • 3
  • 2
1 Solution
 
NETTY4Commented:
There are several points in your scenario which are not going to work:
1.) You cannot access files on browser side by JavaScript.
2.) You cannot do zipping or run WinZip to compress any data.
3.) You cannot access anything on server side by using client side JavaScript.

So the answer is: No way.

0
 
NETTY4Commented:
And if your question is only how to unzip the file sent by ftp on server side, then you should look for the command line version of WinZip to run that command on server side.
 
0
 
davidlars99Commented:
Gordon_Atherley,

you want to zip files client-side and then after the upload unzip them on server-side?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Gordon_AtherleyAuthor Commented:
davidlars99

Yes, that's exactly what I want to do.
0
 
davidlars99Commented:
you can do this, but with very limited options and very serious security voilations. I'd rather list those options one after another, that way you can better understand what's what and where.

1). to zip files you need to have some kind of component i.e. Winzip Command Line Support, which enables you to compress files from Windows Command line, it can be found here http://www.winzip.com/prodpagecl.htm?wzhcli

2). then to upload files to the server you're gonna need another component or there's a program already developed and shipped with windows OS, it's in "c:\windows\system32\ftp.exe". it's a fully functional FTP client and in fact it is very useful.

3). once the files have been uploaded you can use ASP or ASP.NET to unzip them at the specific location.

all this involves the heavy usage of not so popular ActiveX, which is only supported by IE and is known as a big security hole for hackers, if you allow me to run my ActiveX object on you browser I can take full advantage of it and do whatever I want with your computer, so basically you would have to stay within the frames of *intranet zone* and be extremely careful.
0
 
davidlars99Commented:
consider using WScript.Shell throughout the application, you'll find it very useful

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now