Batch file that creates batch file that creates text file

July 26, 2012 at 02:35:17
Specs: Windows 7, 4GB
xD I am creating a program that generates a batch file that creates a log file of its action something like:

echo echo %%time%% - The action was made>>"%%appdata%%\logfile.txt">>"batchfile.bat"

I know that if I want a sign of percent in echo output I need to put two of them %%.
So what about a sign ">>"?


See More: Batch file that creates batch file that creates text file

Report •


#1
July 26, 2012 at 03:42:11
You need to escape > [and < | &] and maybe ().

like this:

echo ^>

echo ^>^> blabla


====================================
Life is too important to be taken seriously.

M2


Report •

#2
September 18, 2012 at 06:06:09
Why not intergrate it into 1?

Because if one batchfile preforms an action it can record it

Instead of creating another batch to find whats going on & record

Eg:
Set folder=banana
Md %folder%
Echo %folder% was created>>log.txt



Report •

Related Solutions


Ask Question