강좌 / 팁

윈 도 우 file_folder2Hide&show, vbe <--> vbs

2020.04.03 15:32

레마클로 조회:630 추천:8

 

FF2HIDE.png

 

 

file_folder2Hide.7z

 

SendTo_copyfilefolder2Hide.vbs를 실행하여 ---file_folder2Hide---.vbs를 SendTo폴더에 복사

 

 

 

f2hs.gif

---file_folder2Hide---.vbs(투박하지만 작동함)

 

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Set Fso = CreateObject("Scripting.FileSystemObject")

Set Args = WScript.Arguments

 

If (Fso.FolderExists(Args(0))) Then 

            Set gFolder = Fso.GetFolder(Args(0))

            gDir = Fso.GetParentFolderName(gFolder) 

            strDir = gDir & "\s-h-o-w-FOLDER.vbs"

Set outFile = Fso.CreateTextFile(strDir, True)

outFile.WriteLine "Set Fso = CreateObject(""Scripting.FileSystemObject"")"

outFile.WriteLine "Set gFolder = Fso.GetFolder(""" & gFolder & """)"

outFile.WriteLine "gFolder.Attributes = gFolder.Attributes AND NOT 2"

outFile.WriteLine "Fso.DeleteFile Wscript.ScriptFullName, True"

outFile.WriteLine "Set Fso = nothing"

outFile.WriteLine "Set gFolder = nothing"

outFile.WriteLine "WScript.Quit"

outFile.Close

     gFolder.Attributes = gFolder.Attributes XOR 2

Else

            Set gFile = Fso.GetFile(Args(0))

            gDir = Fso.GetParentFolderName(gFile) 

            strDir = gDir & "\s-h-o-w-FILE.vbs"

Set outFile = Fso.CreateTextFile(strDir, True)

outFile.WriteLine "Set Fso = CreateObject(""Scripting.FileSystemObject"")"

outFile.WriteLine "Set gFile = Fso.GetFile(""" & gFile & """)"

outFile.WriteLine "gFile.Attributes = gFile.Attributes AND NOT 2"

outFile.WriteLine "Fso.DeleteFile Wscript.ScriptFullName, True"

outFile.WriteLine "Set Fso = nothing"

outFile.WriteLine "Set gFile= nothing"

outFile.WriteLine "WScript.Quit"

outFile.Close

     gFile.Attributes = gFile.Attributes XOR 2

End If

 

Set Fso = nothing

Set Args = nothing

Set gFolder = nothing

Set gFile= nothing

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

 

 

 

============================

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.GetFile("C:\FSO\ScriptLog.txt")

 

If objFile.Attributes AND 0 Then

    Wscript.Echo "No attributes set."

End If    

If objFile.Attributes AND 1 Then

    Wscript.Echo "Read-only."

End If    

If objFile.Attributes AND 2 Then

    Wscript.Echo "Hidden file."

End If    

If objFile.Attributes AND 4 Then

    Wscript.Echo "System file."

End If   

If objFile.Attributes AND 32 Then

    Wscript.Echo "Archive bit set."

End If    

If objFile.Attributes AND 64 Then

    Wscript.Echo "Link or shortcut."

End If    

If objFile.Attributes AND 2048 Then

    Wscript.Echo "Compressed file."

End If

 

============================

 

If objFolder.Attributes AND 2 Then

    Wscript.Echo "Hidden folder."

End If    

If objFolder.Attributes AND 4 Then

    Wscript.Echo "System folder."

End If    

If objFolder.Attributes AND 16 Then

    Wscript.Echo "Folder."

End If  

If objFolder.Attributes AND 32 Then

    Wscript.Echo "Archive bit set."

End If

If objFolder.Attributes AND 2048 Then

    Wscript.Echo "Compressed folder."

End If

 

=========================

 

 

---Encode-vbs2vbe---.vbs와 ---Decode-vbe2vbs---

 

SendTo_copyEncodeDecodeVBSVBE.vbs를 실행하여 

      ---Encode-vbs2vbe---.vbs와 ---Decode-vbe2vbs---.vbs를 SendTo폴더에 복사

제가 만든 파일 아니고 외국자료입니다

 

[예] Svchost_reducer.vbe 마우스 우클릭 --> 보내기 --> "---Decode-vbe2vbs---.vbs" 클릭

 

f2hs2.png

 

 

 

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
1581 윈 도 우| [수정] MoveOT_My설정_onoff_v6.1 [fscapture용 추가] [6] 레마클로 1460 10 05-03
1580 윈 도 우| 윈도우 10 업데이트 이후 검은 화면(black screen) 해결법 [1] 김윈도 4705 3 04-27
1579 윈 도 우| [추가]MoveOT_My설정_OnOff_v5 마지막버전 [34] 레마클로 1568 22 04-21
1578 윈 도 우| 크로뮴 엣지 일부 스트리밍 사이트 (DRM) 영상 재생 불가시 [3] 솔트 1794 8 04-21
1577 윈 도 우| 모니터 색감을 조절하자 - Aura(오라) [4] 깨블리 2689 6 04-20
1576 윈 도 우| [수정] RegOwnership 이용 : 레지소유권 얻기 <--> ... [9] 레마클로 1050 9 04-18
1575 윈 도 우| 윈10 에 기본장착된 "사용자휴대폰" 앱으로 PC ... [28] 와니 6349 4 04-12
1574 윈 도 우| 확장자,숨김(OnOff - NoFile 레지) // 바탕아이콘 정렬문제... [6] 레마클로 1818 16 04-11
1573 윈 도 우| Win PE에서 윈도우 UEFI설치를 합니다. [18] 하늘은높고 5107 30 04-05
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 630 8 04-03
1571 윈 도 우| Move over there 등록_제거 final 2020-04-15 [51] 레마클로 2656 22 03-29
1570 윈 도 우| Windows 10 버전별 CPU 지원 리스트.. [4] 은주얌 3094 4 03-27
1569 윈 도 우| Gpedit.msc는 무엇 이죠? (구글링) [4] 레마클로 1323 1 03-27
1568 윈 도 우| 레노버 노트북 충천USB 사용시 마우스 버벅거림 [1] 번개 720 1 03-26
1567 윈 도 우| Move over there 우메뉴등록_제거 + 그룹정책 백복 [10] 레마클로 1189 11 03-25
1566 윈 도 우| 탐색기 화면에 글자가 부실해 보일 때 설정 방법 [1] 하늘은높고 1424 3 03-25
1565 윈 도 우| 윈도우10 작업표시줄 시계 초 단위 표시하는 방법 [12] gooddew 3246 16 03-22
1564 윈 도 우| [스크립트] Windows 7 January 2020 ISO 만들기 [4] VenusGirl 2149 14 03-21
1563 윈 도 우| CapsLock-toggle [7] 레마클로 697 4 03-20
1562 윈 도 우| 인터넷 ON/OFF [12] 레마클로 3161 12 03-18
XE1.11.6 Layout1.4.8