' Kod ukrywa lub wywietla plik
' ------ KONFIGURACJA SKRYPTU ------
strFile = "<ciekaPliku>"  ' np. d:\mysecretscript.vbs
boolHide = True             ' True - ukrywanie, False - wywietlanie 
' ------ KONIEC KONFIGURACJI ---------
set objFSO = CreateObject("Scripting.FileSystemObject")

' Aby ukry/wywietli katalog, w miejsce GetFile naley wstawi GetFolder
set objFile = objFSO.GetFile(strFile)

if boolHide = True then
   if objFile.Attributes AND 2 then
      WScript.Echo "Plik ju ukryto." 
   else
      objFile.Attributes = objFile.Attributes + 2 
      WScript.Echo "Plik jest teraz ukryty."
   end if 
else
   if objFile.Attributes AND 2 then
      objFile.Attributes = objFile.Attributes - 2 
      WScript.Echo "Plik nie jest ukryty."
   else
      WScript.Echo "Plik nie zosta jeszcze ukryty." 
   end if 
end if
