As read at heise.de Google now released
for free. See the blog entry. I’ll have look at them in a few days…
You want to call a cmdline-tool, but this tool only supports only one file per invocation? But you have to process hundreds of files? With the following approach (in combination with the Totalcommander) you can select many files and handle each file sequentially.
@echo off REM call it via 'foreach.bat filewithfilenames' SET filewithfilenames=%1 for /f %%f IN (%filewithfilenames%) do ( REM insert your code here, the current iteration item is %%f echo %%f )
When calling the startermenu-entry the Totalcommander will save the filenames of the selected files in a temp-file and will provide the filename of the temp-file as parameter. That is the magic of the parameter
%L. (Perhaps such a scheme is also available in Speedcommander, Freecommander and other tools like that?! I do not know…)
Now this temp-file can easily be read using a special syntax of the “
for-loop” of the Windows command line (cmd). Type in
"for /?" in your cmdline for more details on this syntax and see the example above (<code>%%f</code> in line 6).
If you want to convert the text-files (f.e. source code) to UTF-8 you can use the small and handy tool “
iconv -f Cp1252 -t UTF-8 filename.txt > file_converted.txt
Get the windows binary from sourceforge