Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch File for pulling back info...  (Read 3576 times)

0 Members and 1 Guest are viewing this topic.

Franks...

  • Guest
Batch File for pulling back info...
« on: December 20, 2008, 03:25:34 PM »
Hey,

I've written the below batch file to pull back information from a file. The problem is that we get several files with the same name and just different trailer records. I only need the information from the most recent file.

If anyone could show me how to add this to the below batch it would be appreciated.

Code: [Select]
@echo off
set file=POSStartup_All.log
echo. >> %file%
echo %2 %3
echo %2 %3 >> %file%
for %%R in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) do (
ping %1.%%R -n 1
if errorlevel 1 goto :EOF
net use \\%1.%%R "retech" /user:administrator
echo Checkout %%R >> %file%
        dir "\\%1.%%R\c$\retech\logs" | find /i "wsraudit~" >> %file%
net use \\%1.%%R /delete
)