Ping with timestamp and log
<p>Guys im using this script in a batch file to perform continuous ping with timestamp and to be recorded in a log file, it is working fine on my computer ( windows 8 64 bit ) but when i try to use it on a windows 7 machine also 64 bit, whenever i run the batch i keep getting that:</p>

<blockquote>
  <p>Could not find C:\user\administrator\pinglog.txt</p>
</blockquote>

<p>knowing that i have created the file pinglog.txt but i really cant figure out the problem.</p>

<pre><code>@echo off
del pinglog.txt
for /f "tokens=*" %%A in ('ping localhost -n 1 ') do (echo %%A&gt;&gt;pinglog.txt &amp;&amp; GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping localhost -n 1 ') do (echo %date% %time% %%A&gt;&gt;pinglog.txt &amp;&amp; GOTO Ping) 
</code></pre>

<p>i appreciate any help.
Thank you in advance</p>