Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having trouble Windows command line SORT via SHELL
#14
(08-25-2023, 02:53 PM)SMcNeill Wrote: Like I say, try it with quotes around the file names.  

Code: (Select All)
$Console:Only
Sleep
sort$ = "sort " + Chr$(34) + "input.txt" + Chr$(34) + " >> " + Chr$(34) + "output.txt" + Chr$(34)
Print sort$
Shell sort$
Sleep
System

It honestly sounds to me as if you're trying to use a file which the command line is seperating apart into multiple components such as "My Input File.txt".  <-- With the spaces in that file, the command line will parse it as "My", "Input", "File.txt", which is three components rather than one. 

Enclose your file name in quotes and see how things work for you.

******************************

Step 2:  Make certain that if on newer versions of Windows, you're going to a CMD window and not a Terminal as they're not always the same in how they handle things.
Good thinking @SMcNeill

Try filename without spaces to eliminate the need for quotes possibly too.
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
RE: Having trouble Windows command line SORT via SHELL - by grymmjack - 08-25-2023, 04:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to sort negative and positive values ? Jack 16 666 02-23-2026, 02:18 AM
Last Post: Pete
  code locks up when SHELL paulel 4 289 02-15-2026, 08:04 PM
Last Post: madscijr
  trouble filling in a closed vector shape madscijr 31 2,530 11-11-2025, 03:41 PM
Last Post: bplus
  Command$(count%) - I can't get a value when using the optional argument "(count%)" Unatic 3 528 08-22-2025, 11:58 AM
Last Post: Unatic
  keyword to get the EXE name and the EXE path instead of parsing Command$(0) ? madscijr 8 1,157 07-22-2025, 08:35 PM
Last Post: hsiangch_ong

Forum Jump:


Users browsing this thread: 1 Guest(s)