Packing files individually into directory structure

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
zorg
Junior Member
Junior Member
Posts: 13
Joined: 2017-07-14, 03:05 UTC

Packing files individually into directory structure

Post by *zorg »

Hi -

I would like to package files individually while keeping their folder structure. For example, given the source

foo/file1.txt
foo/file2.txt
foo/bar/file3.txt
baz/file4.txt

I would select the folders 'foo' and 'baz', and have the packer to recreate the directory structure and compress the files, leaving me with

foo/file1.zip
foo/file2.zip
foo/bar/file3.zip
baz/file4.zip

Is there a quick way of doing this with the packer? Ive tried 'create separate archives, one per selected file/dir', but that gives

foo.zip
baz.zip

Thanks!
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Hi and welcome.

My guess is you have to utilize a batch/script for that?
Any other ideas?


TC can provide you a list of the selected folders.
In the script you say:
- for each folder and sub folders...
----- for each file in current processed folder...
--------- call command line zip tool



  :?:
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Packing files individually into directory structure

Post by *nsp »

zorg wrote:Hi -

I would like to package files individually while keeping their folder structure. For example, given the source

foo/file1.txt
foo/file2.txt
foo/bar/file3.txt
baz/file4.txt

I would select the folders 'foo' and 'baz', and have the packer to recreate the directory structure and compress the files, leaving me with

foo/file1.zip
foo/file2.zip
foo/bar/file3.zip
baz/file4.zip

Is there a quick way of doing this with the packer? Ive tried 'create separate archives, one per selected file/dir', but that gives

foo.zip
baz.zip

Thanks!
To use the packer, the best way is to get the list of files and then zip once all selected.
  • - Select folders A, B, ....
    - Search in selected file/folder only, recursive.
    - Feed to listbox
    - Select All
    - Call packer only check "create separate archives,...." and set target as zip:*.zip
This should do it !
zorg
Junior Member
Junior Member
Posts: 13
Joined: 2017-07-14, 03:05 UTC

Re: Packing files individually into directory structure

Post by *zorg »

nsp wrote: To use the packer, the best way is to get the list of files and then zip once all selected.
  • - Select folders A, B, ....
    - Search in selected file/folder only, recursive.
    - Feed to listbox
    - Select All
    - Call packer only check "create separate archives,...." and set target as zip:*.zip
This should do it !
Thanks for the suggestion, but it didn't seem to work. When I tried it, all of the compressed files were saved into a single directory, and the original directory structure wasn't recreated.
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Packing files individually into directory structure

Post by *nsp »

zorg wrote:
nsp wrote: To use the packer, the best way is to get the list of files and then zip once all selected.
  • - Select folders A, B, ....
    - Search in selected file/folder only, recursive.
    - Feed to listbox
    - Select All
    - Call packer only check "create separate archives,...." and set target as zip:*.zip
This should do it !
Thanks for the suggestion, but it didn't seem to work. When I tried it, all of the compressed files were saved into a single directory, and the original directory structure wasn't recreated.
Nothing as to be recreated as you zip in place. The target must be exactly zip:*.zip or zip:*.*.zip, by default zip target is defined in the "target Folder" like zip:X:\target\folder\*.*.zip
BlondeHorray
New Member
New Member
Posts: 1
Joined: 2017-07-13, 06:51 UTC
Location: eqwe

Post by *BlondeHorray »

Any one has solutions?
Post Reply