How to address the current directory?

Started by Birdman, February 23, 2023, 03:19:01 PM

Previous topic - Next topic

Birdman

Hello there,

I would like to run a Windows-CMD-file containing an exiftool command from a directory which has no files, but several subdirectories. I used the *.jpg -r command in order to carry out the command for every jpg-file in every subdirectory. But since there is no jpg-file in the current directory (where the cmd starts) the command will stop immediately. Putting the current/parent directory in the command will not work, since I would like to use the cmd in different directories by just coping it and starting there.
Best regards,

Martin (Birdman)

Phil Harvey

Hi Martin,

Try this:

exiftool -ext JPG -r DIR

where DIR is "." for the current directory, or the path to any other directory.

- 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 ($).

Birdman

Best regards,

Martin (Birdman)

StarGeek

To create a drag/drop bat file, you could use
exiftool -ext JPG -r %*

Relevant links as to why you can't use *.jpg and recurse
Common Mistake #2
-r (-recurse) option
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype