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
Gordon_AtherleyAsked:
Who is Participating?
 
davidlars99Connect With a Mentor Commented:
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
 
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
davidlars99Commented:
Gordon_Atherley,

you want to zip files client-side and then after the upload unzip them on server-side?
0
 
Gordon_AtherleyAuthor Commented:
davidlars99

Yes, that's exactly what I want to do.
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.