Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Copy Two Files to Each of the Shared Folders on a ComputerContent of Copy Two Files to Each of the Shared Folders on a Computer.vbsMD5 Hash: BD661CC008A2CB10B142213031E38C88 |
||
Const OverwriteExisting = TRUE
strComputer = "atl-fs-01" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * From Win32_Share Where Type = 0") Set objFSO = CreateObject("Scripting.FileSystemObject") For Each objItem in colItems strFolderName = objItem.Name If InStr(strFolderName, "$") = 0 Then strPath = "\\" & strComputer & "\" & strFolderName & "\" objFSO.CopyFile "C:\Scripts\Test.txt", strPath, OverwriteExisting objFSO.CopyFile "C:\Scripts\Test2.txt", strPath, OverwriteExisting End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |