1

The application causing this issue is a CDripper called freeaccmd (the command line version)

When I run this command

freeaccmd.exe -e LAME -d rip -cd 0 -track 1 -p <title> -cddb >out.txt 2>&1
  options:
  -e <encoder type>
  -d <directory to write ripped files>
  -cd <cd drive instance number to use for multiple optical drives>
  -track <track number to rip>
  -p <format of the ripped file name>
  -cddb <look for cd info in cddb>

This is it. No other options, input or output filenames to specify

it doesn't output anything to the file but spits out everything to the screen I tried to force and error by putting a non existing track number like 17 (this CD has only 16 songs in it) and it still is sending the error output to the screen. I tried

1>out.txt 2>&1
1>out.txt 2>err.txt

but every time it creates the file but won't write anything into it, instead send the output directly to the screen (cmd window that is) I also tried

freeaccmd.exe -e LAME -d rip -cd 0 -track 1 -p <title> -cddb >out.txt | clip

it ends up clearing the clipboard buffer. Is there any way to capture this output to a file ? I am okay if I can run some external app to scrape the characters on the cmd window and put them in a file, if the redirection is hopeless at this point.

Is there a way to capture the whole screen contents in ascii (not image) into clipboard or into a file even if it is with an external program ?

MelBurslan
  • 2,383
  • 4
  • 18
  • 26
  • Usually `2> "err.txt"` should do it. Anyway, I don't know `freeaccmd.exe`, but it might force writing to the console somehow... – aschipfl May 06 '20 at 17:11
  • I thought that the output was supposed to be the actual converted input file, and for that you'd use the `-o` option with your new filespec as its argument string. Obviously you'd also need to provide it the input file too, which is also missing from your command. What is returned when you just use, `freeaccmd.exe -?` or `freeaccmd.exe` in your Command Prompt window? I'd usually expect its usage information to be presented! – Compo May 06 '20 at 23:14
  • freeacmd basically rips the cd in to a digital file. by specifying LAME encoder on command line as it is seen, I am forcing the output file type to mp3. And this is basically the whole command.There is no other input than cd0, which also is seen in my command line. Actually all I need is error output, not the STDOUT. I need to know which track is erroring out so that I can stop ripping. But even doing `2>err.out` without 1>out.txt is not helping. The referenced file gets created but with 0 length ad error message comes to the screen. – MelBurslan May 07 '20 at 06:33
  • 1
    Output to STDOUT and STDERR is a common convention, but not technically necessary. If a programmer designs a program to output directly to screen (`CON:`) instead of STDOUT or STDERR, there's nothing you can do about it. (I don't know if that's the case with *this* program, but it looks like it does exactly that). Maybe you can find a solution to your problem [here](https://stackoverflow.com/questions/61567826/getting-a-windows-command-prompt-contents-to-a-text-file) – Stephan May 07 '20 at 10:47

1 Answers1

0

This works for me...

2>&1 freaccmd -t all -e lame -m CBR -b 320 -cd e: -d .\mp3 -p "<title>" --cddb >>freaccmd.log

Redirect stderr to stdout: 2>&1
Run your freaccmd cmd: 2>&1 freaccmd -t all -e lame -m CBR -b 320 -cd e: -d .\mp3 -p "<title>" --cddb
Redirect append the file: >>freaccmd.log

Also works for clipboard:

2>&1 freaccmd -t all -e lame -m CBR -b 320 -cd e: -d .\mp3 -p "<title>" --cddb|clip 

Obs.: 1 After answering, I considered making the update to the current version, and testing in conventional mode, it worked perfectly.

freaccmd -t all -e lame -m CBR -b 320 -cd e: -d .\mp3 -p "<title>" --cddb>>freaccmd.log

Obs.: 2 Maybe you didn't remember to use "" in the "<title>"

freaccmd -t all -e lame -m CBR -b 320 -cd e: -d .\mp3 -p "<title>" --cddb>>freaccmd.log
Io-oI
  • 2,514
  • 3
  • 22
  • 29