NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: jonashogstrom on 2010-03-15 12:12 am

Title: command line tool (nwc-conv) in 2.1
Post by: jonashogstrom on 2010-03-15 12:12 am
I just downloaded and installed nwc2.1. When I try the command line tool "nwc-conv.exe", it seems that it must be executed from the same directory as the exe-file. If not I keep getting the following error:

Error: The input format Files is not recognized.

WHen correct paths have been provided, the command line tool simply starts the gui-version of the tool, but no file is generated. DId I do something wrong?
Title: Re: command line tool (nwc-conv) in 2.1
Post by: Lawrie Pardy on 2010-03-15 06:45 am
I have to ask, did you provide the correct parameters on the command line?

nwc-conv -h
will display:

Quote
nwc-conv: version 2.1
This program is a front end command to the file convert options
available in the main NoteWorthy Composer program. It must be
located in the same folder as the main NWC program.

Usage: nwc-conv IN_FMT OUT_FMT [-h|-v|-0|-1]

IN_FMT
    This specifies the input file or format that will be used.
    This can be the name of a *.nwc or *.nwctxt file, or if
    STDIN is used, it should indicate "NWC" or "NWCTXT".

OUT_FMT
    This specifies the output file or format that will be used.
    The format can be one of NWC, NWCTXT, MID, or INFO, but may
    not be the same as the IN_FMT. This can be the name of the
    intended output file, or just the the format name if STDOUT
    is used.

-h  Shows this help message
-v  Shows the program name and version
-0  Use type 0 when converting to MIDI
-1  Use type 1 when converting to MIDI

Example: nwc-conv NWCTXT "out\test.mid" -1
    This creates a Type 1 MIDI file using the NWCTXT text
    provided on standard input (STDIN)

Example: nwc-conv "in\test.nwc" NWCTXT > "out\test.nwctxt"
    This converts the test.nwc file into NWCTXT which is sent
    via standard output (STDOUT) to a test.nwctxt file
Title: Re: command line tool (nwc-conv) in 2.1
Post by: Rick G. on 2010-03-15 07:29 am
When I try the command line tool "nwc-conv.exe", it seems that it must be executed from the same directory as the exe-file.
I agree. Using WinXP's command prompt, if I change to the samples folder and use:
Quote
C:\Program Files\Noteworthy Software\NoteWorthy Composer 2\SAMPLES>..\nwc-conv mozart.nwc NWCTXT
the GUI appears with an "unable to convert error"

If I use subst to map g: to the program folder,
Quote
C:\Program Files\Noteworthy Software\NoteWorthy Composer 2\SAMPLES>g:nwc-conv mozart.nwc nwctxt
works as expected.

I hope this can be corrected.
Title: Re: command line tool (nwc-conv) in 2.1
Post by: jonashogstrom on 2010-03-15 08:05 pm
Using the trick with subst I could get it working, thanks.
Title: Re: command line tool (nwc-conv) in 2.1
Post by: NoteWorthy Online on 2010-03-16 09:50 am
Looking into this...
Title: Re: command line tool (nwc-conv) in 2.1
Post by: NoteWorthy Online on 2010-04-07 02:35 pm
A new release of nwc-conv.exe will be available shortly.
Title: Re: command line tool (nwc-conv) in 2.1
Post by: NoteWorthy Online on 2010-04-07 04:43 pm
nwc-conv Version 2.1a can currently be found in the User Tools area (https://forum.noteworthycomposer.com/?topic=7253) in this forum. Licensed users of NWC 2.1 can install this tool into any folder and use it to automate *.nwc file conversions. It will automatically find your installed copy of NWC 2.1 and use it for file conversions.
Title: Re: command line tool (nwc-conv) in 2.1
Post by: Rick G. on 2010-04-07 05:00 pm
Seems to work, but an extra 104k of code just to find nwc2.exe?
Title: Re: command line tool (nwc-conv) in 2.1
Post by: NoteWorthy Online on 2010-04-07 06:25 pm
Seems to work, but an extra 104k of code just to find nwc2.exe?

It is actually from including registry and command line handlers.
Title: Re: command line tool (nwc-conv) in 2.1
Post by: NoteWorthy Online on 2010-04-08 09:35 am
After removing some dependencies, the nwc-conv executable is back down under 80k. We will release that shortly.