|This is magic software and it works because I am a wizard! A lesson on Magic:|
- for %%i in (*.pdf) do retrieves all files with extension .pdf in the current directory;
- ('find "" "%%i"') scans each file to search the null item ("") and outputs ------- FileName in uppercase chars (HERE IS MAGIC);
- for /F "tokens=1*" %%j in extracts tokens 2 to N delimited by space, i.e. the filename (that may have embedded blanks) marked as %%k internal variable;
- eventually you can rename the original filename %%i to the all uppercase one %%k since Windows allows this operation.
To know more take a look at Harry Potter's Magic Software Summer School.