Zip error zip file structure invalid

Yodot ZIP Repair is the ultimate program to fix ZIP error invalid Zip file structure that blocks unzipping of archive on Windows PC

“Hello everybody, I have been facing a problem when I try to extract a large ZIP archive on my desktop. Whenever I try accessing this ZIP archive, I receive an error that says ‘Zip Error: Zip file structure invalid’. I am a novice computer user and I don’t understand anything about such errors. Is there possible method to fix Zip error Zip file structure invalid and make Zip archive active again? If there is any way, kindly suggest one for me. Many thanks in advance for all your precious suggestions.”

Zip is the world’s best archive file format used widely to transfer or share information over internet in Windows computers. This application is used to compress files in Zip format is WinZip. However, there are certain scenarios wherein compressed Zip files will no longer be accessible by WinZip. This happens when ZIP file is corrupt due to which it shows error like invalid file structure as mentioned in above example. So, this article will guide you what this error is about and how to resolve it.

Zip Error: “Zip File Structure Invalid”

This unusual error occurring with Zip file states that archive is corrupt and cannot be accessed. It normally appears while unzipping ZIP archive due to reasons as mentioned below:

  • Missing of crucial system files can lead to corruption of Zip files stored in hard drive
  • ZIP file header corruption due to incomplete download or transfer process
  • Malfunctioning of WinZip application using which archive is tried to decompress due to logical errors
  • Corruption of ZIP file structure that holds critical information of that ZIP archive due to incorrect compression technique used
  • Malware or virus attack on Zip archives that are saved on system hard drive

As Zip file shows this error and stops from being extracted, user may feel annoyed or depressed for not accessing useful data. This kind of situation can be easily resolved by repairing archive using some third party ZIP repair utilities.

Zip error invalid Zip file structure repair tool:

One of the brilliant software to fix not a valid file structure error in Zip file is Yodot ZIP Repair. This program has modest resources to repair Zip archives that are corrupt in various instances with utmost ease. Along with invalid ZIP file structure error, it can also fix other errors of ZIP archive like compressed zipped folder is invalid or corrupted; archive was empty, invalid entry size, CRC error, access denied and many more. This utility is capable to fix 7Zip file and ZIPX file formats that are damaged and inaccessible in number of scenarios. This Zip archive repair tool supports working on Windows 8.1, Windows 8, Windows 7, Windows XP, Windows Vista, Windows Server 2008 and 2003 operating systems.

Step by step procedure to fix invalid file structure error showing ZIP file:

  • Download Yodot ZIP Repair software on your computer and install it
  • Run the utility according to given instructions and wait till main screen gets displayed
  • Now, click on “BROWSE” button to choose error showing ZIP file that needs to be repaired
  • Then click on “REPAIR” to initiate scanning process
  • As scanning process proceeds, its status will be shown in Progress bar
  • When the software completely scans selected Zip file, it displays repaired archive in upcoming screen
  • View the contents of fixed ZIP archive and if satisfied with the results purchase product key to save repaired file

Important Note:

  • Use correct compression method while compressing important files to Zip format
  • Employ good antivirus tool on system to avoid ZIP file damage
  • Frequently, check your system for proper maintenance

Forgive this most basic question, but I couldn’t find a direct answer or simple example on stack exchange.

Let’s say I have a folder of files that I would like to compress into one zip file that I can share with my terrible Windows friends (otherwise I’d just use tar and be done with it). It looks like this:

.
├── file1.txt
├── file2.txt
├── file3.txt
├── file.jpg
└── test.jpg

Assuming I have zip installed:

sudo apt-get install zip

I see from man zip that it allows me to use a file list:

-@ file lists. If a file list is specified as -@ [Not on MacOS], zip takes the list of input files
from standard input instead of from the command line. For example,

          zip -@ foo

So I created zip.lst which looks like this:

cat zip.lst

file1.txt
file2.txt
file3.txt
file.jpg
test.jpg

And now I tried:

zip -@ zip.lst

But it didn’t do anything except create a blank line on the console. And I can keep pushing Enter and it just keeps making more blank lines without seemingly executing the command. After some searching, I realized that I needed to terminate input by pressing Ctrl+D

But now I get this error:

    zip warning: missing end signature--probably not a zip file (did you
    zip warning: remember to use binary mode when you transferred it?)
    zip warning: (if you are trying to read a damaged archive try -F)

zip error: Zip file structure invalid (zip.lst)

What!? How is my simple list not a «valid file structure»? Back to the manual for more information, and I take a closer look at:

If a file list is specified as -@…

So I try it without -@, and that at least processes it right away without having to press Ctrl+D but I’m left with the same error.

Luckily, I found a comment on an answer to a nearly unrelated question that led me to realize that I needed to explicitly name the zip file. This error’d because by default it was trying to create a zip file called zip.lst. But since that’s the name of my list, one might think that it would simply overwrite it, but no, it was in fact trying to update it. And since the list obviously isn’t a zip file, we get the invalid file structure error, and now it’s clear why it said «probably not a zip file.» So then I tried:

zip files.zip zip.lst

adding: zip.lst (deflated 35%)

Eureka! I can see the zip file was created and my folder now contains this:

.
├── file1.txt
├── file2.txt
├── file3.txt
├── file.jpg
├── files.zip
├── test.jpg
└── zip.lst

But wait before we celebrate, let’s confirm the contents of the zip file first:

unzip -l files.zip

Archive:  files.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
       48  2016-05-24 15:30   zip.lst
---------                     -------
       48                     1 file

No! Well, actually that makes sense from standard usage because it just zipped up the one list file I gave it. Finally I tried again with -@ but got the same result.

What am I doing wrong?

BTW, I know I can use the GUI and do it with my mouse, but I need to script this, and in general I’m faster on the CLI when I know what I’m doing.

Набросал простой скрипт для резервного копирования некоторых файлов и папок в домашней папке. Но вовремя заметил, что скрытые файлы и директории(начинающийся с точки) по умолчанию не добавляются в архив.

zip -r -9 backup-`date +"%d-%m-%Y_%H.%M"`.zip /home/sergey/* 
	-x "/home/sergey/.cache/*" 
	-x "/home/sergey/VM/*" 
	-x "/home/sergey/SeleniumProfile/*" 

Разумеется, смотрел справку, гуглил — в статьях кто-то говорит что нужно точку со звёздочкой поставить, кто-то просто точку в параметрах — ничего не работает.
Копирую примеры из гугла — zip мне выдает:
zip error: Zip file structure invalid (.)


  • Вопрос задан

    более двух лет назад

  • 452 просмотра

Попробуйте так:

zip -r -9 backup-`date +"%d-%m-%Y_%H.%M"`.zip /home/sergey/.

Мне кажется, или zip (или bash) нелогично себя ведет.
Решил проблему методом тыка:
вместо пути /home/sergey/* прописал /home/* — и все скрытые файлы и папки добавились в архив.

Пригласить эксперта

Пример
Исходные данные:
— имеем папку test
в ней скрытая папка .test и скрытые файлы: .bash_history и .bash_test

Задача:
— сделать архив .zip с находящимися в папке test файлами: .bash_history, .bash_test и скрытой папкой .test

Выполнение:

$ cd test
:~/test$ ls -a
:~/test$ .  ..  .bash_history  .bash_test  .test
:~/test$ zip test . -9 -r
  adding: .bash_test (stored 0%)
  adding: .bash_history (stored 0%)
  adding: .test/ (stored 0%)
:~/test$ ls
test.zip

Проверяем архив:

:~/test$ unzip -l test.zip | awk -F'/' 'NF<3 && !$2'
Archive:  test.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
       11  2020-10-31 14:05   .bash_test
       11  2020-10-31 14:05   .bash_history
        0  2020-10-31 14:08   .test/
---------                     -------
       22                     3 files

Заметь!
Точка — . в коде zip test . -9 -r
как раз и есть операнд для архивирования скрытых файлов и каталогов…


  • Показать ещё
    Загружается…

10 февр. 2023, в 08:59

1000 руб./за проект

10 февр. 2023, в 08:22

2000 руб./за проект

10 февр. 2023, в 04:49

50000 руб./за проект

Минуточку внимания

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • [SOLVED] create zip files in ubuntu command line

  1. create zip files in ubuntu command line

    i want to zip a entire folder of files. So i entered the following command

    zip *.* *.zip

    But zip gives me a error.

    PHP Code:


    zip warningmissing end signature--probably not a zip file (did you

        zip warning
    remember to use binary mode when you transferred it?)
    zip errorZip file structure invalid (fc.pdf)
    pdftotext# zip *.* *.zip

        
    zip warningmissing end signature--probably not a zip file (did you

        zip warning
    remember to use binary mode when you transferred it?) 



    How do i resolve this ? Could someone please help me ?


  2. Re: create zip files in ubuntu command line

    Code:

    zip -r name_of_output_archive.zip directory_to_archive/

    Have a look at man zip for more info


  3. Re: create zip files in ubuntu command line

    Hi,

    Note that *.* is the DOS way of globbing. To pick all (non-hidden) files in a directory in Linux, use * instead. You also use the wrong argument order for the zip command. The name of the zip file comes first, the stuff you want in the file comes second. That’s why you got the weird error.

    Now if you wanted to zip the directory into one compressed file, follow mutley89‘s advice. But if you are trying to compress each file into a self-named zip file, then that’s not what you want, and I think just correcting your syntax will not help. I say that because you seem to be imagining that both wildcards in your command will be expanded to the same filename, resulting in a series of commands like zip file1.zip file1, zip file2.zip file2, and so on, with n commands for n files in the directory. But I don’t think that is what will happen.

    When I want to do a «for each» kind of operation, I use a short script, which can be entered at the command line. For you, something like this will work if your (reordered) original command doesn’t work.

    Code:

    for file in `ls -1`; do zip "$file".zip "$file"; done

    Last edited by noah++; December 4th, 2011 at 11:15 AM.


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

I am still not getting nowhere with this.

I have tried this as well

xxxx]$ cd /home/mandri/Desktop/test

test]$ zip -e >/home/mandri/Desktop/test.zip

That accepts the password,and creates a zip archive on my desktop.

The terminal just stalls at the line adding: — and the zip archive remains at 0 bytes.

I also tried this

cd Desktop

Desktop]$ zip -e test >test

bash: test: Is a directory

For recursive subdirectories I guess you’ll need to pipe the output of find into the input of zip. But I’ve not tried this.

So I then tried this

Desktop]$ zip -e test >test.zip

Enter password:

Verify password:

zip warning: missing end signature—probably not a zip file (did you

zip warning: remember to use binary mode when you transferred it?)

zip error: Zip file structure invalid (test.zip)

I also tried this

Desktop]$ zip -e test >test/*

bash: test/*: ambiguous redirect

Then this

Desktop]$ zip -e test/* >test.zip

Enter password:

Verify password:

This seemed to finish,and it created a zip archive on my desktop,and I didn’t see it stall at adding: — like earlier.

But the zip archive is still 0 bytes.There’s nothing in it.

I should add because you gave examples of .txt,I am trying to zip an entire directory(a folder containing a few other folders)one folder with wallpapers,another folder with pictures from my camera,and also including text files within the parent directory,which is /home/mandri/Desktop/test

And oh yeah,I’m getting so caught up in this,I almost forgot to say thanks for replying.

So THANKS. :)

EDIT

Desktop]$ zip -e test/* >test.zip

Enter password:

Verify password:

This seemed to finish,and it created a zip archive on my desktop,and I didn’t see it stall at adding: — like earlier.

But the zip archive is still 0 bytes.There’s nothing in it.

I seen there was a file size of 118 bytes,not near enough for the wallpapers and .jpegs.

When I try to open it,I get the error «Could not open the file, probably due to an unsupported file format».

Using ark,I get «an error occured when trying to open the archive».

I have since tried this too,no luck.

cd Desktop

Desktop]$ zip -e -r test >test2.zip

Enter password:

Verify password:

zip error: Nothing to do! (test.zip)

Desktop]$ zip -e -R test >test2.zip

Enter password:

Verify password:

zip error: Nothing to do! (test.zip)

Desktop]$


Edited February 14, 2008 by mandri

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Zip error temporary file failure
  • Zip error nothing to do ошибка
  • Zip error nothing to do linux
  • Zip error invalid command arguments short option not supported
  • Zip error invalid command arguments cannot write zip file to terminal

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии