My batch skills are limited. To produce results for many files, I use DIR /a-d /s /b > dirlist.txt
. I import dirlist.txt into Excel (column A), and use that to produce file-by-file commands (in column B) that I can then copy into a batch file. It's more cumbersome than looping, but at least I understand it.
The present situation calls for CRC32 calculation. I have a command-line tool that expresses only the CRC32 value, without the corresponding filename. Hence, my Excel solution outputs the filename (i.e., ECHO D:\[full path].ext >> output.txt
) before calculating the CRC32 value (i.e., ampersand (&
) followed by CRC32.exe "D:\[full path].ext" >> output.txt
). In other words, the spreadsheet produces a single command that states the filename and then the CRC32 value.
Unfortunately, this puts the filename on one line, in output.txt, followed by the CRC32 value on the next line. I think it is possible to get the two on the same line, but this situation seems more complicated than the simple examples I'm seeing in tutorials. So the question is, is there a relatively straightforward way to state the filename and the CRC32 value in a single line of output?
concatenate
function in Excel to join your file name and checksum? Or are you doing it via VBA?