qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
19.94k stars 653 forks source link

[Question/CLI] How to test multiple directories? #1004

Open gabrielmn opened 1 year ago

gabrielmn commented 1 year ago

Not sure if I'm doing something wrong, but I can't run czkawka dup --directories dirA dirB.

pwd
/home/gabriel/dupes
ls
test  test_bk
czkawka dup --directories /home/gabriel/dupes/test /home/gabriel/dupes/test_bk
error: unexpected argument '/home/gabriel/dupes/test_bk' found
czkawka dup --directories [/home/gabriel/dupes/test /home/gabriel/dupes/test_bk]
error: unexpected argument '/home/gabriel/dupes/test_bk]' found
czkawka dup --directories </home/gabriel/dupes/test /home/gabriel/dupes/test_bk>
bash: syntax error near unexpected token `newline'

And variations with ", ' and ,

edit: This is folder structure is just for testing, in the real scenario folder A and B will not have the same parent.

wwalker commented 11 months ago

I have the same problem.

  -d, --directories <DIRECTORIES>
          List of directorie(s) which will be searched(absolute path)

Yet it only accepts ONE directory.

wwalker commented 11 months ago

@gabrielmn

I figured it out. The --help info is misleading/incorrect.

Rather than doing this, as the --help info shows you to do:

czkawka dup ... --directories /home/wwalker /home/Old/wwalker

You need to do it like this:

czkawka dup ... --directories /home/wwalker --directories /home/Old/wwalker
ShareBugreports commented 11 months ago

I agree, using a separator is difficult because a lot of characters are allowed in linux.

Compared to Jdupes. All items at the end are directories.

jdupes --options "/path/to/dir1" "/path/to/dir2"

Multiple flags to add multiple directories is another solution. But the current help text is misleading. It should not be plural. It should also contain some text explaining to add multiple "-d" flags. (note this change might break user scripts using the "long-form" flag)

  -d, --directory <DIRECTORY>
          Add single directory which will be searched(absolute path).