Re: txt file as parameter list?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"for /f %%F "

To honor Bill Stewarts "coming out",
this would apply to NT+ only.



"Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx> wrote in message news:%23yZYEdynHHA.2584@xxxxxxxxxxxxxxxxxxxxxxx

"William Stokes" <will@xxxxxxxxxxxxx> wrote in message news:%236nzhVsnHHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

I have a small script for copying files:
xcopy "Z:\Notes Clients\6.5.4 FI W32Intel\Lotus Notes 6.5.4 fi.msi" \\testpc01\c$\WINDOWS\Installer /Y /Z /V

I would like to use a dest.txt file as destination PC list. Like:

testpc01
testpc02
testpc03

How can I read this dest.txt and pass the computername to xcopy command?

This could certainlly be done using WSH, but a very simple batch solution exists that looks a bit like this (untested) script:

for /f %%F in (test.txt) do xcopy "Z:\Notes Clients\6.5.4 FI W32Intel\Lotus Notes 6.5.4 fi.msi" \\%%F\c$\WINDOWS\Installer /Y /Z /V

This command will simply display a series of xcopy commands. If they seem OK, you could then edit out the "ECHO/" before running the script again.

/Al



.



Relevant Pages

  • Re: txt file as parameter list?
    ... I have a small script for copying files: ... How can I read this dest.txt and pass the computername to xcopy command? ...
    (microsoft.public.scripting.wsh)
  • Re: txt file as parameter list?
    ... It reads the lines from the files.txt but the filenames in the txt file have ... I have a small script for copying files: ... How can I read this dest.txt and pass the computername to xcopy command? ...
    (microsoft.public.scripting.wsh)
  • txt file as parameter list?
    ... I have a small script for copying files: ... I would like to use a dest.txt file as destination PC list. ...
    (microsoft.public.scripting.wsh)
  • Help - UNIX Shell script problem
    ... I have an UNIX Korn shell script running on HP-UX11 that currently ... encounter a problem in copying files, ... # Remote copy the event files on the DBS server ... # Get the list of remote archive files ...
    (comp.unix.shell)
  • Re: Use Group Policy to deploy a Desktop shortcut
    ... ' An example of using environment variables when copying files. ... ' In this script a shortcut 'shortcut.lnk' is copied to the desktop ...
    (microsoft.public.windows.server.active_directory)