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

Author Topic: Remove text file from  (Read 2097 times)

0 Members and 1 Guest are viewing this topic.

sromine

  • Guest
Remove text file from
« on: November 14, 2006, 05:51:15 PM »
Thanks to alot of help in this forum, I am moving forward with a batch script that will input system names from a text file and then copy a certain file to these systems.  I have included that script below.

What I would like to happen now is to somehow be able to easily keep track of which machines have had the files copied to them successfully and which havent....My first thought was just run an Echo command that outputs the date, time and computer name some like:

echo %date% %time% %%i diskclean_update>>c:\maintscript\dclog.txt

but it wouldnt be that easy to keep track of which machines were done quickly and easily.

One solution would be to simply remove the machine name from the list after the file has been succesfully copied.  Then I could look at the text file and quickly see how things were going.  Unfortunately this string manipulation is out of my skill range.  Can anybody shed any light on it?

Here is the script below that I am working on thanks to help from this forum.  systems.txt is a list of system names that I have.  The goal is to make sure the file only gets copied once to the system and someway of easily seeing how many systems are left to go....maybe remove the machine name from the systems.txt?

@echo off
for /f "tokens=*" %%i in (c:\maintscript\systems.txt) do (
      copy c:\maintscript\diskclean.bat \\%%i\c$ /y
      )