강좌 / 팁

윈 도 우 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 - - -
4487 소프트웨어| pureBasic - WIM 정보 v0993 - 내부 파일 추가 삭제 내보내... [40] 입니다 8691 160 12-22
4486 소프트웨어| 한글2024 로고 교체 / 자동 설치 옵션 [54] 무월 13199 107 11-25
4485 소프트웨어| [추가기능1.1]엑셀 셀의 행-열 Auto-Highlight 하는 방법들 [77] 지후빠 2818 103 11-10
4484 윈 도 우| PrincePE_V18.5 [164] %카리스마 204984 99 02-02
4483 윈 도 우| WindowsXPE147-2/나만의 PE를 만들자 시즌2 ?? 2탄(중급용) [158] update 지연서연아 916 91 04-29
4482 윈 도 우| PE 한글화 프로그램 (v1.0) [106] ㄱㅇㄱㄱㅁ 28043 89 06-25
4481 윈 도 우| 윈도우 10 설치, 최적화 및 기타 팁 100개 정리 [56] 컴알못러 27782 79 01-26
4480 윈 도 우| WindowsXPE147-1빌더/나만의 PE를 만들자 시즌2 ?? 1탄 (... [60] 지연서연아 2245 73 04-16
4479 윈 도 우| PrincePE_V20 [52] %카리스마 2835 72 03-05
4478 윈 도 우| 배치파일을 이용해서 윈도우 자동 설치하기 [22] gooddew 4977 70 10-16
4477 윈 도 우| Windows 10 Ultimate (DREAM HS) [58] @카리스마 7353 70 08-14
4476 소프트웨어| iVentoy 만능윈도우(WIM) 자동 설치 [20] 무월 4261 66 07-08
4475 윈 도 우| PrincePE_V19 [53] %카리스마 5096 65 02-15
4474 윈 도 우| 윈도우 장치 드라이버 추출(백업) 명령어 [25] 컨피그 2733 64 02-23
4473 윈 도 우| 윈도우10 만능이미지 제작 메뉴얼 [43] 질주민군 5586 64 11-19
4472 소프트웨어| 트루이미지(Acronis True Image) 추가본②(본문 수정) [91] 고양이2 9118 62 11-26
4471 서버 / IT| 손쉽게 멀티부팅용 USB 만들기. (내용추가) [51] update 디폴트 7408 61 05-31
4470 윈 도 우| 무인응답파일(autounattend.xml) 쉽게 만들기 [30] 네오이즘 3880 60 12-31
4469 윈 도 우| PrincePE_V22 [53] %카리스마 6602 59 03-06
4468 소프트웨어| ▣▣▣▣▣[ Ventoy 고급 응용편 자료 정리 ]▣▣▣▣▣ [31] 메인보드 7866 57 05-14
XE1.11.6 Layout1.4.8