Extracting files from ZIP files with long names – Windows

Once DAP users have downloaded files from the DAP as a Zip Archive, it is possible to encounter problems extracting files from the Zip. The issues addressed on this page are associated with:

  • the length of the name of the Zip file (number of characters)
  • the length of the resulting file paths (also the number of characters, of all the elements in the file path).

It is also possible that lengthy names of individual files in the Zip file can cause this problem.

This issue was identified in mid-December 2022, and a technical solution will ultimately address it. In the meantime, this page documents the issue and provides workaround solutions.

The problem

Windows directory

For computers running the Windows Operating System, if you use the “Extract All…” feature, there is a path length limit of 255 characters for the directory name and file name combined.

In practical terms, this means you can run into problems when you try to extract a file with a lengthy name from a Zip, to a sub-directory that also has a lengthy name.

Depending on the particular version of the Windows operating system, you can encounter error messages like these:

  • Using the Extract All… feature of File Explorer, in Windows 10 and subsequent
  • Using older version of Windows, prior to Windows 10

OneDrive

You can experience a similar issue if you try to extract files from Zip Archives to OneDrive, which has a 400 character limit on file paths:

Possible solutions

7-Zip feature

7-Zip can help. It allows extraction of data from Zip Archives to folder structures which will result in file paths longer than the 255 character limit for Windows Explorer.

If not already installed on your computer please download 7-Zip from https://www.7-zip.org/.

Rename the Zip file

  1. Find your downloaded Zip file
  2. Rename the Zip file to something significantly shorter
  3. Try the extract again

Shorten lengthy file names in the Zip Archive

Lengthy file names for the files in the Zip Archive can also contribute to file paths that are too long.

  • Clean up the failed extract
    • Select “Cancel”
    • Delete the directory the extract was downloading to (This removes the possibility of duplicating files.)

There are then several options for correcting a file path that is too long:

  1. Rename the file with the long name (This may not be appropriate if it affects the functionality of the file.)
  2. Move the Zip file to the C: Directory (if you have access, to shorten the file path), then move the files to the desired location once the extract is successful
  3. Extract the files from the Zip file while it is in the Downloads Directory, then move the files to the desired location once the extract is successful.