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



Users browsing this thread: 4 Guest(s)