Create a zip with the files without any parent directory
See original GitHub issueHi, I’d like to have all my files directly into the zip without any folder.
So If I do that…
zip.addLocalFile('asset1.png');
zip.addLocalFile('asset2.png');
zip.addLocalFile('asset3.png');
zip.writeZip('files.zip');
… then extract files.zip, I’d like to have directly the 3 assets and not
files/asset1.png
files/asset2.png
files/asset3.png
Thanks a lot
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
Zip an archive without including parent directory - Ask Ubuntu
Use the -j or --junk-paths option in your zip command. From the zip man page: -j --junk-paths Store just the name of a...
Read more >Zip a file without including the parent directory
My goal is to zip the file from outside this folder (so without using cd command) without including the folder dir. zip -r...
Read more >How can I create a zip file without including the files parent ...
Just select the files and create a zip archive with the name of the parent folder. When you unzip it will ...
Read more >how to create a zip file without including parent directory Linux
This vedio describe you how to create zip file without including its parent directory through command linehow to create a zip filehow to ......
Read more >How To Zip A file Without Including Parent Directory
Solved: Hi, I managed to get Alteryx to automate zipping a file using Run Command using a batch file written with Alteryx but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Realized this is a difference between mac and linux. On my Mac, it automatically unzips into a directory the same name as zip file. When I unzip on linux, it works as expected.
Hope this saves someone else some time.
Was there ever a resolution to this? I need to use ‘addLocalFolder’ and I need all of the files to be at the root of the zip.
The following code puts all the files in a root directory “my-zip”. Im using version 0.4.11.