강좌 / 팁

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

2020.04.03 15:32

레마클로 조회:632 추천: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 - - -
4154 빠른 실행!!!(중복이여도 다시 올려요) [5] 라임노트 9046 0 10-06
4153 [Tip] 느려터진 IE8을 좀만 더 빨리~ [10] GoogleDotC 13000 0 10-07
4152 자이루스 16GB USB에 7.47GB AIO 넣기 [28] 유산균 22152 0 10-09
4151 슈퍼바 확장 프로그램 7stacks...해놓고 보니 중복이네? [8] sp2 7581 0 10-09
4150 윈 도 우| 윈도우7에서 K10STAT 쓰기 [2] 백단심계 13032 0 09-04
4149 윈도우 서버 2003/2003 R2 최적화 팁 [1] core2e8400 11115 0 10-11
4148 기 타| 효과적인 파티션 분활 [4] gooddew 10778 0 10-11
4147 기 타| 토렌트 과부하 현상을 해결하자 [6] gooddew 10807 0 10-11
4146 비주얼스튜디오2008에서 cpp생성항목이 사라질때 [2] 사이키 5826 0 10-12
4145 윈도우7에서 네이버스포츠 실시간 보기 [1] 보로미르 7931 0 10-13
4144 체험지수 측정시 드라이버 오류로 점수가 안나올때 [4] 가우즈 15533 0 10-14
4143 (수정) 윈도우에서 서체 관리 [4] 뚜버기 7961 0 10-14
4142 (수정) 윈도우7 창 관련 팁 [4] 뚜버기 10750 0 10-14
4141 25 GB 무료 웹하드 - MSN SkyDrive [2] 뚜버기 6075 0 10-14
4140 윈도우7 XP Mode 허접 팁??? [3] 아리스 8524 0 10-14
4139 트루이미지 복구영역 : F11키 다른키로 바꾸기 [1] run2thesun 11155 0 10-14
4138 win7에서 superfetch(readyboost)가 되지 않을때 참조 키미니 35497 0 10-17
4137 드림씬할때 소리 나오게 하기 [4] 건방 5926 0 10-17
4136 32비트 기업은행 안될때 [4] 박정윤 6470 0 10-19
4135 Windows 7 인증 무력화 [9] 진모씨 30040 0 10-22
XE1.11.6 Layout1.4.8