강좌 / 팁

윈 도 우 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 - - -
4160 윈 도 우| [팁&경험담] 구형노트북HDD에서 SDD 복제 후 오리지널w... [6] 바수 2306 3 04-09
4159 소프트웨어| [포토샵] 낙관 만들기 [7] 무월 1987 11 04-09
4158 소프트웨어| [포토샵] 이미지 패턴 합성 [11] 무월 875 9 04-08
4157 소프트웨어| [포토샵] 도장 투명 이미지 추출 [23] 무월 2994 20 04-06
4156 윈 도 우| 지후빠님 UAC 회피기동 [1] 슈머슈마 1155 10 04-06
4155 소프트웨어| ACDsee 로 이미지파일 빨리 분류하는 법 [1] ton3d 1142 4 04-06
4154 소프트웨어| [포토샵] 짝눈 보정 [15] 무월 1567 17 04-05
4153 소프트웨어| [포토샵] 인물 배경 분리 및 배경 합성 [12] 무월 1533 16 04-04
4152 소프트웨어| [포토샵] 인물 전신 그림자 만들기 [5] 무월 840 16 04-04
4151 소프트웨어| [포토샵] 다중 개체 선택 지우기 액션 [4] 무월 898 13 04-03
4150 소프트웨어| [포토샵] 소실점 그리드로 이미지 합성 [5] 무월 1016 13 04-03
4149 소프트웨어| [포토샵] 패스를 따라 텍스트 입력 [4] 무월 660 14 04-03
4148 소프트웨어| [포토샵] 텍스트 지우기 [4] 무월 1094 15 04-03
4147 소프트웨어| [포토샵] 인물 아웃포커싱 [5] 무월 1132 17 04-03
4146 소프트웨어| [포토샵] 이중턱 보정 하기 [4] 무월 1973 12 04-03
4145 소프트웨어| [포토샵] Auto Blend Layers를 이용한 얼굴 합성 [5] 무월 1053 14 04-03
4144 윈 도 우| 인터넷(랜) 온/오프 VBScript와 배치파일 2탄 [8] 지후빠 959 14 04-01
4143 소프트웨어| PE를 VHD에 설치하고 등록하기-vhdman [6] 카멜 1475 26 03-29
4142 윈 도 우| 배치파일 등에서 윈도우 32비트/64비트 구분 [7] 지후빠 1396 17 03-27
4141 윈 도 우| 윈도우 11 에서 시스템 요구 사항이 충족되지 않다고 하는 ... [6] gooddew 2469 14 03-24
XE1.11.6 Layout1.4.8