강좌 / 팁

윈 도 우 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 - - -
4200 윈 도 우| [실사] 윈도우 7/8.1/10/11 전체 무인설치 [28] 무월 5022 15 07-09
4199 윈 도 우| 윈도우11에서 Open Shell로 시작버튼 사용하기 팁 [4] -민군- 2126 4 07-07
4198 윈 도 우| 윈도우10 기본 브라우저 초기화 및 재설정 [4] 무월 1820 5 07-07
4197 소프트웨어| 노턴 시큐리티 Ver.22.20.5.40 한글판 탐지 제외 설정 방법 [2] 타천사둘리 1389 1 07-05
4196 윈 도 우| [실사] 윈도우11(22H2) 업그레이드 우회 설치 [12] 무월 4604 17 07-02
4195 윈 도 우| [실사] 윈도우10/11 만능WIM 자동 설치(WinToHDD 5 8) [15] 무월 3464 16 07-02
4194 소프트웨어| Symantec Endpoint Protection(SEP) 삭제방법(삭제시 비밀... [3] 타천사둘리 2076 6 06-28
4193 기 타| 지원이 끝난 PC 드라이버 해결하기 [4] Win10pro 3181 1 06-27
4192 윈 도 우| [실사] 스틱PC Windows 10 32bit UEFI 설치 [3] 무월 1874 6 06-26
4191 윈 도 우| [실시간 보호 기능 켬/끔] 좀 더 편하게 실행 [24] 지후빠 3881 48 06-26
4190 기 타| macOS 13 Ventura 설치(Bootable ISO/USB 생성) [2] 무월 2395 9 06-19
4189 소프트웨어| NIUBI Partition Editor에 배드(불량) 섹터 검사 기능이 있... [2] 그루터기 1132 7 06-18
4188 윈 도 우| 업무화면과 주식화면을 분리시키기 [1] 좋게멋지게 2463 8 06-17
4187 윈 도 우| [실사] 윈도우7/8.1/10 업그레이드 설치 - 윈도우10(21H2) [5] 무월 2991 15 06-12
4186 윈 도 우| 윈도우11 22621.4 에서 IE 11 사용방법 [11] 타천사둘리 2781 10 06-11
4185 기 타| iptime 공유기. 국가별 접속제한 사용 시 iptv 안 나올 때 ... [4] heykevin 2502 7 06-08
4184 소프트웨어| 엑셀로 KBS1 KBS2 MBC SBS 등 편성표 가져오기 [14] 지후빠 2694 14 06-06
4183 하드웨어| [팁] 아이패드에서 마우스 휠 스크롤 방향 바꾸기 [1] asklee 856 1 06-01
4182 소프트웨어| 비즈니스용 MS Office365 신규 UI적용하기 [2] 마집사 2646 6 05-27
4181 윈 도 우| 소소한 배치파일 팁 2가지(start 명령, %time%) [7] 메리아 2156 10 05-26
XE1.11.6 Layout1.4.8