강좌 / 팁

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

2020.04.03 15:32

레마클로 조회:631 추천: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 - - -
1588 윈 도 우| VHD 부트에서 부팅된 VHD 파일경로 추출과 활용 스크립트 [2] Neutrino 1032 7 05-31
1587 윈 도 우| LG 복원 솔류션 이식하기 (UEFI) [14] gooddew 4634 15 05-30
1586 윈 도 우| LG Recovery(UEFI)에 대해서.... [9] 밤이슬216 4478 13 05-25
1585 윈 도 우| 일반 PC 에 삼성 복원 솔루션 이식하기 (UEFI) [54] gooddew 12116 42 05-21
1584 윈 도 우| [팁] 윈도우 탐색기 자동 새로고침에 대한 간단한 팁. [5] 메리아 3777 2 05-19
1583 윈 도 우| SRS7에 대해서..좀 더 자세하게..일반 PC용으로.... [14] 밤이슬216 3486 5 05-18
1582 윈 도 우| SRS8 --- install.wim [5] 밤이슬216 3249 10 05-18
1581 윈 도 우| [수정] MoveOT_My설정_onoff_v6.1 [fscapture용 추가] [6] 레마클로 1463 10 05-03
1580 윈 도 우| 윈도우 10 업데이트 이후 검은 화면(black screen) 해결법 [1] 김윈도 4712 3 04-27
1579 윈 도 우| [추가]MoveOT_My설정_OnOff_v5 마지막버전 [34] 레마클로 1568 22 04-21
1578 윈 도 우| 크로뮴 엣지 일부 스트리밍 사이트 (DRM) 영상 재생 불가시 [3] 솔트 1797 8 04-21
1577 윈 도 우| 모니터 색감을 조절하자 - Aura(오라) [4] 깨블리 2693 6 04-20
1576 윈 도 우| [수정] RegOwnership 이용 : 레지소유권 얻기 <--> ... [9] 레마클로 1052 9 04-18
1575 윈 도 우| 윈10 에 기본장착된 "사용자휴대폰" 앱으로 PC ... [28] 와니 6351 4 04-12
1574 윈 도 우| 확장자,숨김(OnOff - NoFile 레지) // 바탕아이콘 정렬문제... [6] 레마클로 1821 16 04-11
1573 윈 도 우| Win PE에서 윈도우 UEFI설치를 합니다. [18] 하늘은높고 5126 30 04-05
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 631 8 04-03
1571 윈 도 우| Move over there 등록_제거 final 2020-04-15 [51] 레마클로 2661 22 03-29
1570 윈 도 우| Windows 10 버전별 CPU 지원 리스트.. [4] 은주얌 3099 4 03-27
1569 윈 도 우| Gpedit.msc는 무엇 이죠? (구글링) [4] 레마클로 1323 1 03-27
XE1.11.6 Layout1.4.8