Exploding Garrmondo Weiner Interactive Swiss Army Penis

Exploding Garrmondo Weiner Interactive Swiss Army Penis (http://www.gamingforce.org/forums/index.php)
-   Help Desk (http://www.gamingforce.org/forums/forumdisplay.php?f=36)
-   -   Filetype filter for creating ZIP/RAR archives (http://www.gamingforce.org/forums/showthread.php?t=36906)

neothe0ne Mar 29, 2009 10:19 PM

Filetype filter for creating ZIP/RAR archives
 
I'm trying to make a ZIP archive of a folder with many subfolders in it and preserve the directory structure, but I only want to include one filetype (or exclude filetypes).

Does anyone know of a way to filter filetypes when creating archives?

RacinReaver Mar 30, 2009 02:07 AM

There might be a way of doing something like

copy c:\YourFolder\*.zip c:\OnlyZips\

from a DOS prompt to only copy zip files within a certain directory, and then you could zip up that second directory.

LiquidAcid Mar 30, 2009 02:01 PM

That probably depends on the ZIPping utility.

The standard 7zip commandline tool, has both filetype include and exclude switches, which do exactly what you want:

From the man page:
Code:

-i[r[-|0]]{@listfile|!wildcard}
Include filenames

-x[r[-|0]]]{@listfile|!wildcard}
Exclude filenames

@RacinReaver: That obviously won't work, since it (the copy command) doesn't see subdirectories in YourFolder. Also it duplicates files first, which you have to delete afterwards. Which is turn leads to more fragmentation. Don't do it that way.

@neothe0ne: If your ZIPping utility can't do it, then don't use it. It should already be deprecated. 7Zip can also create plain ZIP files, if you really need that. I'm not sure about the Windows GUI, but probably the functionality is already exported there - so you don't have to do it via commandline.


All times are GMT -5. The time now is 10:42 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.