add extension to extension-less files.

Started by bilalalthaf, June 19, 2014, 05:34:12 PM

Previous topic - Next topic

bilalalthaf


bilalalthaf

Please list me all the IF commands. Or give me a link to the forum where all the If Commands are there. With the if command you gave me i did 70% of my sorting work. Thanks so much :D

Phil Harvey

The number of -if commands is infinite.  See the application documentation for a description of the syntax.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bilalalthaf

im not so advanced to understand all that. let me make it simple :(

1) if i want to move audio files more than 55 seconds to another folder. what would be the if function i should use?

2) if i want to move picture files bigger than the size 500x500. what should be the if function i should use?

Phil Harvey

Quote from: bilalalthaf on June 24, 2014, 01:24:11 PM
1) if i want to move audio files more than 55 seconds to another folder. what would be the if function i should use?

-if "$duration# > 55"

Quote2) if i want to move picture files bigger than the size 500x500. what should be the if function i should use?

-if "$imagewidth > 500 or $imageheight > 500"

(use "and" instead of "or" if you want both width and height to be greater)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


bilalalthaf

When i used the "if duration" tag only the m4a files got moved. the mp3 and wav format files werent moved :/


Phil Harvey

What is the output of this command for these files?:

exiftool -duration# FILE

You may use any available tag name in the expression.  Extract all tags with exiftool -s to see what is available.  If Duration isn't available, maybe using FileSize instead would be possible.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bilalalthaf

actually i found the problem out but i dont know to solve. you would know. the issue is that all those files have the duration, but
after the duration they have the tag called <approx>

example

Duration : 00:02:45 <approx>

so whats the solution?

Phil Harvey

Did you forget the "#" after "duration" in your commands?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bilalalthaf

no i did not forget becoz i copied exactly what you quoted

Phil Harvey

Then you must be using a very old version of ExifTool.  Try upgrading to a more recent version.  The current version is 9.65.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bilalalthaf

I'm already using the latest version. And i repeat. Its only moving (.m4a) files. Not the wav mp3 and ogg files. As i said its showing <approx> after the file.

and the file size wont be fine. bcoz wav files are bigger in size. and if i wanted to do by size. i could do it directly by sorting the files by size on windows explorer itself..

bilalalthaf

ok sir. i finally got something done by myself :P

i added the tag -ext mp3 wav.. and it did the job :)