I am trying to make a batch file to run ccleaner & defraggler in cmd line. I want it to output a txt file with a log upon completion, is this possible and what would be the best way to achieve this. Thanks in advance.
I don't know about outputting to a log file, however you can have both of them working from a command prompt/batch file script if you want.
Just look at the command line instructions on http://docs.piriform.com/