Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
In order for make the batch file display the commands it's executing, get out a "@echo off" line if it exists.
And if you want to redirect its output to a file, execute the batch file like this:
%comspec% /c MyBat.bat > logfile.txt
That will erase any previous information existant on logfile.txt. The following will just append the new info, preserving the original:
%comspec% /c MyBat.bat >> logfile.txt
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br__________________________________________________

my batch file is like this:
"
@echo off
CLSecho :: Erases Recent Files List [OK]
DELTREE /Y %WINDIR%\RECENT\*.*echo :: Erases Recent Microsoft Office Files List
DELTREE /Y %WINDIR%\applic~1\micros~1\office\filere~1\*.*echo :: Erases Windows Temp Directory [OK]
DELTREE /Y %WINDIR%\TEMP\*.*
"i have tryed also deleting "@echo off" , but your solution on my pc doesn't work,
it create an empty log file.

You realize the string "MyBat.bat" on my last post was just an example, don't you? You should replace it by the filename of your own batch file.
Perhaps that's what's going wrong?
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

Ok ok i'm a little distract ; )
But your solution don't show me the errors happened when the batch file don't find a file, can you tell me why?oh, thanks

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |