Reputation: 81
I am using third party image viewer (XnView) that allows to select files i want and then run ExifTool with custom command line on this files only.
When i open multiple files using ExifTool i get name of each file using ${FileName}
.
However i need to find name of only first file from all files selected, because i need to create folder with name of first file in sequence then move all files there.
-k -Filename<${Directory}\${FileName;s/\.[^.]*$//}\${Filename}
- this moves each file to separate folder, need to move all files to one folder
Is there way to get file names array so i can then query first entry e.g. filesArray[1]
or how can i get name of first file?
Upvotes: 0
Views: 219
Reputation: 5781
Related thread on the Exiftool forums
Exiftool only processes one file at a time and doesn't have the ability to extract a static value from a list and hold on to that value. You'll have to create a script to find the value you want.
If you're using Linux/Mac, see command line find first file in a directory
If you're using Windows, maybe Batch file to list only the first file from every directories in a tree and output the results in a text file
Upvotes: 1