Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to set the title of image files (view Properties - tab Details - Title textbox) to be their filenames by running a command from command line. How can I do this?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Install ExifTool for Windows to somewhere in your PATH and rename it to exiftools.exe

Then you can use the following command to update the Title field for each JPG file in the current directory:

for %i in (*.jpg) do @exiftool -Title="%~ni" %i

By default, exiftool seems to create copies of the originals with the extension .jpg_original before modifying them.

share|improve this answer
    
When I run your command I get the error ~ni" i was unexpected at this time. Please help. –  Nam G. VU Jun 9 '10 at 10:54
    
Are you trying to do this in a .bat file or .cmd file? If so, you will need to use %%i instead of %i and %%~ni instead of %~ni. Also, you will need to make sure you have Command Extensions enabled when using cmd.exe –  Mike Fitzpatrick Jun 9 '10 at 11:03
    
I run the script by .bat file. I replace %i to %%i and %~ni to %%~ni and it works. Thank you. –  Nam G. VU Jun 10 '10 at 3:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.