I have to run the following command for hundreds of .docx files in a directory in a windows in order to convert them to .txt.
java -jar tika-app-1.3.jar -t somedocfile.doc > converted.txt
I was wondering if there is any automatic way such as writing a ".bat" file to do this.
Yes you can do it in batch. An example isn't coming to mind in order to help you but since you are running java commands anyway you can do it through java too. Here is an example of how you can be running the commands on CMD from java. Hope this helps.
UPDATE
Okey here is the way simpler batch way which I couldn't think of yesterday :D
It reads all the *.doc files in the directory it is executed, also the "~n" is in order to list only the filenames ( in your example "somedocfile" ) because otherwise it will do something like "C://...../somedocfile.doc" and changing the extension might be annoying.