NWC 2.75 has a builtin INFO method that can be accessed from the command line. It shows you some summary stats about a file, including NWC version used to create it, play time, and fonts used. You can access this facility from the User Tool mechanism using the attached Windows batch file. The recommended user tool settings are also shown.
Additional Details: A file's path name is sent to user tools that handle File Text. The file path is only provided for existing non-sample files. If you want to retrieve the version info for an old file, you must make sure that you do not save it prior to invoking this tool. Once you save a file in a new version of NWC, the old information is lost.
Additionally, user tools receive input encoded as utf-8. If your files are named with characters beyond simple ASCII, you will likely experience issues with this tool.
The source code is also shown below:
@echo off
setlocal EnableDelayedExpansion EnableExtensions
set nwc2=%CD%\nwc2.exe
set fnline=
for /F "tokens=*" %%a in ('findstr "^#/File:"') do (
set "fnline=%%a"
)
if "%fnline%"=="" (
echo No filename found...this command does not work on samples or new unsaved editor sessions
goto done
)
set "fname=%fnline:~8%"
if not exist "%fname%" (
echo Error: File '%fname%' not found
) else (
echo File: %fname%
echo:
"%nwc2%" -convert "%fname%" INFO
)
:done
exit 99
Fixed numerous problems with initial command.
I still miss something.
After running the user tool I just get:
!NoteWorthyComposerClip(2.75,Single)
|Text|Text:"Processing File: \'C:\]Tmp\]Pollet - Deuxime sonate sans pdales.nwc\'"|Font:StaffBold|Pos:8|Wide:Y
!NoteWorthyComposerClip-End
So what?
P.S. Please note that the 'è' in the filename disappeared.
I don't know what is happening for you, although the filename character issue is mentioned above. If you are not getting a report after running the tool, then the batch command is not concluding properly (the
exit /b 99 call triggers report mode back to NWC).
It might help if you explained more details about your system. Also, are you able to run the user tool command shown below? If so, what do you get?
cmd.exe /C "set && exit /b 99"
I made some additional changes in an attempt to eliminate any possible causes for Flurmy's troubles.
Yes, it runs. It opens a dialog box reporting the listing that results from the "set" command.
I suppose that's what you expected.
Also, the new version of nwcInfo.cmd works too.
Thanks