강좌 / 팁

윈 도 우 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 - - -
4463 소프트웨어| pureBasic 포인트 기본 이해 [3] 입니다 367 10 03-25
4462 소프트웨어| purebasic Macro 기본 [3] 입니다 423 10 03-25
4461 소프트웨어| purebasic 함수 인수 기본 값 설정으로 생략하기 [2] 입니다 356 9 03-24
4460 소프트웨어| purebasic 기본적인 변수, 함수 선언 [5] 입니다 453 11 03-24
4459 소프트웨어| purebasic 폼 만들기 기본 [3] 입니다 644 13 03-24
4458 소프트웨어| pureBasic 기본 설정 [4] 입니다 955 14 03-24
4457 윈 도 우| (수정5) 윈도우 버전구분 배치파일 [4] 메리아 1208 14 03-23
4456 윈 도 우| 윈도우11&10 앱 제거 무인설치 [16] 무월 1714 29 03-22
4455 소프트웨어| 윈도우를 다른 디스크에 복사하기 [20] gooddew 2052 40 03-20
4454 윈 도 우| Windows 11에서 Android를 웹캠으로 사용하는 방법 VᴇɴᴜꜱGɪ 1105 6 03-16
4453 윈 도 우| 22621.3296 22631.3296 업데이트 주의. [9] 타천사둘리 2222 12 03-14
4452 기 타| WindowsXPE147 수정버전 사용법 입니다... [27] 노랑개굴 1902 49 03-11
4451 모 바 일| 유튜브 밴스드 홈화면 해결방법(?) [8] 체리마키아 2001 8 03-10
4450 소프트웨어| WinNTSetup 윈도우7 VHD 설치 [19] 무월 1889 25 03-06
4449 기 타| [오토핫키 v1] 경로, 이름 ,드라이브명 등등 추출 함수 [2] 청락은복 868 8 03-06
4448 소프트웨어| 부팅항목숨기기,보이기-VHDman Lite0.0.8 [3] 카멜 561 10 03-06
4447 윈 도 우| 시스템 보호 설정 우클릭 메뉴 [13] 와로 1322 27 03-04
4446 소프트웨어| Bcd 항목 1회성 부팅하기-VHDmanLite [7] 카멜 757 15 03-04
4445 소프트웨어| Bcd부팅항목 메뉴 숨기기 [3] 카멜 458 9 03-04
4444 소프트웨어| 드라이버 백업&자동 설치 - WinNTSetup [17] 무월 1665 31 03-03
XE1.11.6 Layout1.4.8