Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).
Eliminate relative folder structure when unzipping a file
A zip file containing both files and folders can be extracted so all the files appear on one level with no subfolders.
Robo-FTP version 3.8
The trick with version 3.8 is to unzip the existing file, re-zip with the /subdirs option, then unzip a second time. Like this:
UNZIP "source.zip" "zip_temp" "*" /subdirs
ZIP "new_flat.zip" "zip_temp\*" /create /subdirs
UNZIP "new_flat.zip" "zip_flat" "*"
After running the above sequence of commands the folder named "zip_flat" will contain all the files from source.zip with no subfolders.
Robo-FTP version 3.9 and Later
Robo-FTP 3.9 added a new
/flat option to the UNZIP command. See the Help file for details.
Article last updated: 2017-12-27
Tags: Robo-FTP, ZIP, flat