Source language: Translate to:

DOS command

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

DOS command

Postby cp4w » Sat Feb 10, 2007 8:24 pm

I want to sort a text file using the RUN command, but don't seem to get it quite right. I have
Run "sort" "!a:\file1.txt > !a:\file2.txt" "Normal" "" ""
but something isn't right---debugger doesn't give error message. Thanks in advance for assist.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby Gaev » Sat Feb 10, 2007 9:22 pm

cp4w:

a) You only need to specify ! character at the start of a "parameter" of a NeoBook command ... if encounrtered elsewhere, it will be treated as a normal character.

b) The sort command has a command line parameter for specifying the output (destination) of the sorted data ... so you do not need to resort to the > technique ... which works when typed on the DOS command line ... but I believe is problematic when specified as part of the parameter for the Run command ... try ...
Code: Select all
Run "sort" "!a:\file1.txt /O a:\file2.txt" "Normal" "" ""
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby cp4w » Sat Feb 10, 2007 9:52 pm

That did it. Thanks a lot.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Dos Sort Command

Postby cp4w » Sun Feb 18, 2007 4:56 pm

Gaev,

I used the Sort command you suggested in DOS and it worked fine.
However, in NB, I copied and pasted your suggested code. When I ran it I saw a quick flash of black which I assume was a DOS screen, but no sorting was done. Is there something I missed?
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Gaev, Nevermind re: DOS sort

Postby cp4w » Sun Feb 18, 2007 5:27 pm

I don't know what happened, but it's working now.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby Neosoft Support » Mon Feb 19, 2007 12:45 pm

The black screen that you see is the DOS window executing your command. If you don't want to see that try changing your Run command to use the "Hidden" option. For example:

Code: Select all
Run "sort" "!a:\file1.txt /O a:\file2.txt" "Hidden" "" ""
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests