Код:
![Выделить весь код](images/misc/selectcode.png)
Option Explicit
Dim strFile
Dim strPath
With WScript.CreateObject("Scripting.FileSystemObject")
For Each strFile In Array("1.txt", "App.bk")
strPath = .GetAbsolutePathName(.BuildPath(WScript.CreateObject("Shell.Application").NameSpace("shell:Common Documents").self.Path, "..\Replica\New\" & strFile))
If .FileExists(strPath) Then
With .GetFile(strPath)
If Not .Attributes And 1 Then
.Attributes = .Attributes Or 1
End If
End With
End If
Next
End With
WScript.Quit 0
Из этого:
Цитата Iwest:
проверить что они есть на компе и если есть …»
|
видно, что смысла в сообщениях вида «Файл не найден» нет.