강좌 / 팁

윈 도 우 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 - - -
4480 윈 도 우| Windows 업데이트를 사용하여 데이터를 잃지 않고 Windows ... [3] VᴇɴᴜꜱGɪ 999 5 04-23
4479 소프트웨어| pureBasic Glass 윈도우 및 버튼 021 [6] 입니다 977 14 04-20
4478 윈 도 우| WindowsXPE147-1빌더/나만의 PE를 만들자 시즌2 ?? 1탄 (... [57] update 지연서연아 1939 68 04-16
4477 서버 / IT| 하드 디스크 사용시간 초기화 하기 [6] gooddew 1806 9 04-15
4476 소프트웨어| 응답파일(unattend.xml) 교체 및 수정 - ChangeUnattend [14] 무월 1205 39 04-13
4475 소프트웨어| AOMEI Backupper 백업실패 및 글씨 안보임 문제해결법 [5] 『ⓖⓤⓝ』 761 12 04-12
4474 윈 도 우| 윈도우 계정/자동로그인 버그 해결 방법 사가르마타 761 0 04-12
4473 윈 도 우| 원격 데스크톱..., 자격증명이 작동하지 않습니다... [1] 사가르마타 305 1 04-12
4472 윈 도 우| SSD 에서 파일 삭제를 주의해야 되는 이유 [3] gooddew 2222 12 04-10
4471 윈 도 우| 특정 폴더목록 자동열기 배치파일 [2] 메리아 701 13 04-09
4470 윈 도 우| 하드 디스크 아이콘 바꾸기 [11] 타천사둘리 1312 8 04-08
4469 소프트웨어| pureBasic 자동완성을 위한 프로젝트 만들기 [6] 입니다 1011 14 03-28
4468 윈 도 우| [uupdump] 윈도우 업데이트 및 드라이버(IRST&NVMe) 통... [17] 무월 2194 34 03-27
4467 소프트웨어| WimLib Api 백업.복원 미완성. 샘플 7가지. [10] 입니다 908 12 03-27
4466 소프트웨어| SDK(Software development kit) 에 대한 이해 [5] 입니다 589 7 03-27
4465 소프트웨어| pureBasic 구조체, Union 구조체 [4] 입니다 615 9 03-25
4464 소프트웨어| pureBasic 외부 함수 호출 [1] 입니다 358 9 03-25
4463 소프트웨어| pureBasic 포인트 기본 이해 [3] 입니다 362 10 03-25
4462 소프트웨어| purebasic Macro 기본 [3] 입니다 420 10 03-25
4461 소프트웨어| purebasic 함수 인수 기본 값 설정으로 생략하기 [2] 입니다 355 9 03-24
XE1.11.6 Layout1.4.8