![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | simple file copy problem I can't see what I am doing wrong. I modified this script that I found on MS web site. All files are in the same directory. Const ForReading = 1 Const OverwriteExisting = TRUE Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\Scripts\Computers.txt") Do Until objFile.AtEndOfStream strComputer = objFile.ReadLine strRemoteFile = "\\" & strComputer & "\C$\windows \system32\winexit.scr" objFSO.CopyFile "C:\Program Files\Windows Resource Kits\Tools \winexit.scr", strRemoteFile, OverwriteExisting Loop |
My System Specs![]() |
| | #2 (permalink) |
| | Re: simple file copy problem On Aug 24, 5:55*pm, wuzzle <wuzz...@xxxxxx> wrote: Quote: > I can't see what I am doing wrong. *I modified this script that I > found on MS web site. *All files are in the same directory. > > Const ForReading = 1 > Const OverwriteExisting = TRUE > > Set objFSO = CreateObject("Scripting.FileSystemObject") > Set objFile = objFSO.OpenTextFile("C:\Scripts\Computers.txt") > > Do Until objFile.AtEndOfStream > * * strComputer = objFile.ReadLine > * * strRemoteFile = "\\" & strComputer & "\C$\windows > \system32\winexit.scr" > * * objFSO.CopyFile "C:\Program Files\Windows Resource Kits\Tools > \winexit.scr", strRemoteFile, OverwriteExisting > Loop were either sleeping or off. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: simple file copy problem On Aug 25, 1:54*pm, wuzzle <wuzz...@xxxxxx> wrote: Quote: > On Aug 24, 5:55*pm, wuzzle <wuzz...@xxxxxx> wrote: > > > > > Quote: > > I can't see what I am doing wrong. *I modified this script that I > > found on MS web site. *All files are in the same directory. Quote: > > Const ForReading = 1 > > Const OverwriteExisting = TRUE Quote: > > Set objFSO = CreateObject("Scripting.FileSystemObject") > > Set objFile = objFSO.OpenTextFile("C:\Scripts\Computers.txt") Quote: > > Do Until objFile.AtEndOfStream > > * * strComputer = objFile.ReadLine > > * * strRemoteFile = "\\" & strComputer & "\C$\windows > > \system32\winexit.scr" > > * * objFSO.CopyFile "C:\Program Files\Windows Resource Kits\Tools > > \winexit.scr", strRemoteFile, OverwriteExisting > > Loop > I figured it out. *Some of the machines I was trying to copy files to > were either sleeping or off. on it. Will speed up your script and give you better logging options. ![]() |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| UAC FAR file copy problem | Vista General | |||
| Problem with file copy over Gb LAN from Vista x64 to XP x86... | Network & Sharing | |||
| Simple? How to copy WWW picture to C drive | VB Script | |||
| Can't simple copy from a Mac to my ext HD | General Discussion | |||
| No need to burn a DVD, simple ISO file problem solution. | Vista General | |||