You have to use the FileSystemObject. Hint: This could be googled very easily.
Example:
Sub HideFolderFiles(filespec)
Dim fs, f, r
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(filespec).Files
f.attributes = 2 'hidden
End Sub
Source: https://www.experts-exchange.com/questions/28054761/VBScript-to-set-file-attributes.html
2
solved How to convert .Net code to vbscript?