I am working on a CLI file uploading application and would like to have a combination of added and rewritten output. Ideally, it would look something like this:
c:\>upload file1.dat 100% file2.dat 100% file3.dat 59%, 36.4k/s
I would like only the last line to periodically update the percentage and current speed. I know that I can use SetCursorPosition to write output to any part of the console, but it seems that GetCursorPosition does not exist, and the absolute position of the last print file will be different. I also wonder how all this will affect the redirected output, but the proper handling of this parameter is not critical for this application.
EDIT : It looks like Console.CursorLeft / Console.CursorTop etc. will give me the current cursor position. I also looked at them! Well. Free accepted answer if someone wants it.
source share