Skip to main content
Topic: command line tool (nwc-conv) in 2.1 (Read 5748 times) previous topic - next topic

command line tool (nwc-conv) in 2.1

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?

Re: command line tool (nwc-conv) in 2.1

Reply #1
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
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: command line tool (nwc-conv) in 2.1

Reply #2
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.
Registered user since 1996

Re: command line tool (nwc-conv) in 2.1

Reply #3
Using the trick with subst I could get it working, thanks.

Re: command line tool (nwc-conv) in 2.1

Reply #4
Looking into this...

Re: command line tool (nwc-conv) in 2.1

Reply #5
A new release of nwc-conv.exe will be available shortly.

Re: command line tool (nwc-conv) in 2.1

Reply #6
nwc-conv Version 2.1a can currently be found in the User Tools area 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.

Re: command line tool (nwc-conv) in 2.1

Reply #7
Seems to work, but an extra 104k of code just to find nwc2.exe?
Registered user since 1996


 

Re: command line tool (nwc-conv) in 2.1

Reply #9
After removing some dependencies, the nwc-conv executable is back down under 80k. We will release that shortly.