Get the new PortableApps.com Platform 10.0: Gorgeous themes, a full portable app store and advanced functionality
Announcing the World's Best Flash Drive: The PortableApps.com Companion | Did you see a malware warning on Friday?

Forward commandline output to a file

vince@cmic.ca - January 22, 2009 - 1:06pm

First off. What A WONDERFUL LITTLE program. Toucan is amazing.

Can someone please help with this:
I trying to forward the out of a backup job to a file but it never works.

This is what I have...

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>Toucan backup > log.txt

But the log file is always empty. The wierd thing is it still outputs as normal.

But if I do:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>ipconfig > log.txt

This works perfectly fine.

Could someone PLEASE help me out?


( categories: )

Quotes?

Maybe put "Toucan backup" in quotes. If that doesn't work, maybe Toucan just doesn't like job titles with spaces.

Sometimes, the impossible can become possible, if you're awesome!

As John

says quotes should do it,

toucan "Toucan backup" > log.txt

Ought to work fine.

'...and do the other things, not because they are easy, but because they are hard...' JFK

Double?

If I recall correctly, using double greater-than signs will append to the file if it already exists:

toucan "Toucan backup" >> log.txt

That way it can really be a "log" file instead of just a report of the last run.

Jim

neutron1132 (at) usa (dot) com

I

never knew that, thanks Smiling

'...and do the other things, not because they are easy, but because they are hard...' JFK

Forward commandline output to a file

Thanks for the help but I don't think you understand.

This still doesn't work.

I am trying to run a "job".

If I type:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>toucan job1 > log.txt

It does not forward the output.

BUT IF I TYPE:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>ipconfig > log.txt

It works perfectly fine.

Please try it yourself, and please try to help me find a solution.

OR, even better please have an option in the "job" to save the job out status to a file.

THANKS!!!

no output to the console

Hi vince,

toucan.exe is not sending output back to the console.

When you run toucan.exe you can see that a new window (application window / application console) will be opened. Output from that windows is not transfered back to the console.

This means that you can not get it with ">" or ">>".

Addressed to the developer:
I recomment to add a command line option („-log”) to “toucan.exe”.
By default the log file should be stored in the toucan program folder.
A second option to define a path where to store the log file would be nice.

Timing on obtaining the output

Also addressed to the developer:

Christian's identification of the root cause of the problem is correct.

One point that should be added to his suggestion of the log file is that control should not be returned to command line until the backup is completed. If control goes back to the command line prior to completion of the backup, the log will be incomplete.

The best scenario requires the following features when you are running in batch mode:
1) Availability of a log file showing the complete backup
2) An exit code (ERRORLEVEL) identifying the success or failure of the backup. Typically, this is 0 if an operation is successful, and 16 or greater if it is a failure. Intermediate values can identify specific situations, if there is a possibility that the user can recover automatically if the situation is known.

If you have both of these features, the entire operation can be easily automated.
The

Command Line Output

Any progress on this feature ? Love the app, but would really like to be able to capture that output, or at least be able to control the log file name.

-Chad

Sure,

I actually just uploaded a new development test which adds this feature, see the manual for more info and any questions just ask Smiling

'...and do the other things, not because they are easy, but because they are hard...' JFK