강좌 / 팁

윈 도 우 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 - - -
4462 소프트웨어| rufus 3.18 사용법 (2가지) [24] suk 5933 55 03-14
4461 소프트웨어| PC 카카오톡 광고 제거 (6차 수정) [47] CraXicS 6502 55 05-29
4460 소프트웨어| Ventoy usb만들기 [41] 메인보드 6316 55 09-04
4459 윈 도 우| PE 드라이버 통합하기 V1.03 [41] 히이이잌 5320 53 02-09
4458 윈 도 우| 나만의 PE를 만들자 실전편 1탄(윈도우 10PE빌드하기) [173] 지연서연아 26363 51 08-27
4457 소프트웨어| 램디스크(Ram Disk) 만들기 - 본문 수정 [60] 고양이2 9433 50 12-02
4456 기 타| WindowsXPE147 수정버전 사용법 입니다... [27] 노랑개굴 1902 49 03-11
4455 윈 도 우| 윈도우11 $OEM$소스 및 WinNTSetup 응용 설치! [40] 무월 3462 49 02-03
4454 기 타| 구글 드라이브 다운로드 초과했을 때 다운로드 방법 [41] suk 26735 49 11-19
4453 소프트웨어| 다음 팟플레이어 광고[팝업] 차단 [12] 무월 3126 48 07-26
4452 윈 도 우| [실시간 보호 기능 켬/끔] 좀 더 편하게 실행 [24] 지후빠 3882 48 06-26
4451 소프트웨어| 크롬 하단 다운로드창 활성화 [11] 무월 2795 46 08-03
4450 윈 도 우| [실사] 단일 SSD(HDD)에서 윈도우 설치 하기! [20] 무월 3948 45 10-14
4449 윈 도 우| [1탄] install.wim 누적 업데이트 통합 하기 [26] 무월 1875 45 08-19
4448 윈 도 우| PrincePE_V21 [30] %카리스마 2449 45 03-06
4447 윈 도 우| 키만 6번 누르세요~ [121] 익덕이 9430 45 05-27
4446 기 타| 그 동안 본인이 업로드한 강좌를 보내드립니다. [181] 고양이2 12717 45 11-06
4445 소프트웨어| 한글 2020 제품키 자동 입력 및 업데이트 통합하기 [28] CraXicS 10942 44 02-06
4444 윈 도 우| 윈도우 10 최적화 설정 하기 [31] gooddew 10264 44 02-02
4443 윈 도 우| 드라이브 스냅샷 백업 복구 - 재배포 [30] 슈머슈마 2679 43 11-07
XE1.11.6 Layout1.4.8