Hi Alsways uploading made web-sites , projects, I want to make such thing
make zip file,
upload one file
and then extract with default CHMOD for folders lets say 755 and for files 664
With Cpanel hostings its OK, I can do it via file manager... But for hostings without I can't.
Baybe someone can give a hint how...????
I use php unzipper. Here is quick tutorial on it.
Tutorial
The FTP protocol doesn't allow for such a thing.
Sometimes I keep a locked down directory where I drop compressed files and I have a little PHP script that unzips them by doing glob("*.zip") to get all the files, and executing the unzip on them.
My "solution" does require the ability to execute commands, but if you're in a more restricted environment you can use PHP's zip_ functions or even a PEAR package.
Related
I'm trying to use Tar.exe in a Windows 10 command prompt to zip an entire folder and its subdirectories into a .zip file.
After reading different answers on here and this online help, so far I have the following:
tar.exe -cvzf "C:\Users\Me\Desktop\Output.zip" "C:\Users\Me\Desktop\MyFolder"
This appears to work within the command prompt (no errors and all files get listed). The .zip file gets created on the Desktop but when I try to open it by double-clicking on it, I get this error:
Windows cannot open the folder.
The Compressed (zipped) Folder 'C:\Users\Me\Desktop\MyFolder' is invalid.
I dragged the file into Notepad to see if there were any headers that might uncover the problem, but it looks like some kind of oriental affair...!
Can anyone advise what I've done wrong here please?
After much deliberation, I finally opted to use 7-Zip:
"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\Users\Me\Desktop\MyFolder.zip" "C:\Users\Me\Desktop\MyFolder"
The destination machine without 7-Zip could still read the file, but more importantly, the speed of the zip creation was magnitudes faster than Windows's UI or the Tar function.
I've just built an app with Electron.
Installing and running electron-packager . creates a folder my-app-win32-x64 with a bunch of assets and DLLs.
This isn't exactly something I can distribute to consumers.
What's the simplest way to generate a Windows installer for my electron executable?
It looks like according to their wiki you can. Follow the instructions here! https://github.com/electron/windows-installer
You may try electron-wix-msi it will help you to create a exe file.
it will basically ask you for your source file Path example D:\xyz\my-app-win32-x64
and will create a desired file at app source path.
I'm new in JAVA\Grails\Groovy. Just began to create simple apps.
I've got a task to create grails app that:
1) shows a list of source zip files on a remote server, that is available by FTP and SSH
2) shows a list of destination remote servers with predefined target folders, that are available only by SSH
3) after choosing source zip and dest server it copies zip to target server\folder and unzippes. Progress bar must be shown.
4) performs some additional commands, such as ls or something like that
All configurations must by either in config files or in the database.
No information should be hardcoded in app.
Please help me to choose approach, plugin or framework.
Any help would be appreciated
I've used JSch a lot for SCP file transfer and remote exec using SSH and works very well. You could use it directly like you would in a Java app, by adding a dependency for the jar in BuildConfig.groovy
compile 'com.jcraft:jsch:0.1.51'
but the most trivial Google search I could manage that included "Grails" and "SSH" tells me that there's this plugin which looks great, and this plugin which also looks great, and this blog post which looks great, and also this plugin which uses a different library but also looks great.
Those options cover the ssh and scp/sftp parts, and you can use the JDK support for Zip files, e.g. java.util.zip.ZipFile and the other related classes in that package, to unzip the files. The rest is pretty straightforward, but if you need more help ask more questions (one question per question).
We all love the Facebook SDK for iOS, if you go here to download it,
https://developers.facebook.com/docs/ios/getting-started
for some reason you get this sort of insane .pkg file,
which APPEARS TO ONLY create the "FacebookSDK" folder in your "Documents" folder.
Then you just move it where you want, wondering "Why the hell do they do that?"
Does anyone know
Is there on Facebook.com an official link somewhere to simply a zip of the library?
Is there a reason they use the package system? (Does it -- check on versions, or something - does it check you have needed stuff on your Mac maybe?)
Does it drop any crap anywhere that one has to clean up? Is it mildly malicious at all?
The installer also installs the docset.
You can check in Terminal to see what's going on:
First, expand the installer from inside your Downloads directory:
$ mkdir facebook_sdk
$ cd facebook_sdk
$ xar -xf ../facebook-ios-sdk-3.15.1.pkg
This will create a new pkg file which is just a directory. cd into that and unzip the Payload:
$ cd FacebookSDK.pkg
$ cat Payload | gunzip -dc |cpio -i
Then open the directory in Finder to browse the contents:
$ open -a finder .
You'll be able to see what gets copied where, and you can just pull out whatever you want:
To answer your questions more specifically:
Is there on Facebook.com an official link somewhere to simply a zip of the library?
To my knowledge, no, but you can use CocoaPods to get it.
Is there a reason they use the package system? (Does it -- check on versions, or something - does it check you have needed stuff on your Mac maybe?)
It might remove old deprecated files when installing new versions, and it makes it easier to install the docs.
Does it drop any crap anywhere that one has to clean up? Is it mildly malicious at all?
It's not malicious. You might not want the docs if you're tight on space.
We are running an business where we are preparing email stationeries for people. We want to make life easier for our Mac users to install their stationery in their mail application. The way we are doing that now is:
1. Prepare a zip file
2. Contact client, send a file, tell him where to extract that, repair any results of miscommunication and so on
We want to cut both points and allow him to go to our website, click a link and download an installer file, or self extracting zip, or whatever else that after double click will be extracted to appropriate path. Path is constant, it can be contained in some configuration file or even compiled with bytecode.
I've tried preparing a custom package and self-extracting zip archives without a success (in both cases there was a tiny details that made it impossible to get a result using that method). Do you guys have any other ideas?
Here's some completely untested bash code you could have them run to download and unzip a file.
#!/bin/bash
cd ~/Downloads
wget http://www.yourserver.com/coolfiles.zip
unzip coolfiles.zip -d /path/to/installation/place
rm coolfiles.zip