강좌 / 팁

윈 도 우 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 - - -
561 윈 도 우| Windows ISO의 정확한 빌드 번호 확인하기 [3] suk 1680 13 05-11
560 윈 도 우| 저해상도 게임 실행시 각종 창 크기 작아지는 증상 해결 방법 [3] 오호라7 1879 3 05-12
559 윈 도 우| 윈도우 업데이트 오류 해결 [10] 사랑이7 3471 19 05-13
558 소프트웨어| ▣▣▣▣▣[ Ventoy 고급 응용편 자료 정리 ]▣▣▣▣▣ [31] 메인보드 7865 57 05-14
557 기 타| 모니터 색상이 탁할때 쓰는 꿀TIP [5] 할리우도 3683 10 05-16
556 하드웨어| 하드 디스크의 파손된 커넥터 수리 방법 [8] gooddew 3614 9 05-16
555 윈 도 우| [배치파일포함]윈도우 10에서 부팅 관리자를 원클릭으로 변... [5] 복원솔루션 3324 20 05-17
554 하드웨어| 노트북 BIOS 암호를 분실 했을 때 찾는 방법 [6] gooddew 3143 8 05-23
553 소프트웨어| ventoy.json 예제 및 이미지 리스트 작성 [5] 메인보드 1517 10 05-23
552 소프트웨어| 【팁】Ventoy 설치부터 제거까지 사용법s [5] qnd 5093 18 05-29
551 윈 도 우| 동영상 자동재생 태그 생성 방법 [5] 메인보드 1210 5 05-30
550 윈 도 우| WinPE (Windows PE) 빌더 다운로드 및 정보 [3] 오스 2152 4 05-31
549 윈 도 우| 파일에 대한 썸네일 미리보기를 비활성화하지 않고 폴더 썸... 깨블리 786 2 05-31
548 윈 도 우| 수정)VHD 교차부팅 관련 스크립트 [8] 히이이잌 1619 13 05-31
547 윈 도 우| 방화벽에서 IP : 162.159.36.2 PORT : 53 아웃바운드 정책... [2] 은주얌 2318 7 06-04
546 기 타| 【한】Ventoy 핫키메뉴 한글화 하기 [4] qnd 3548 18 06-06
545 소프트웨어| ventoy.json 설정 수정 [7] 메인보드 1780 11 06-07
544 하드웨어| DIY 조립컴 10단계완성법 [8] 항해하는자 3920 21 06-08
543 소프트웨어| 때늦은... 클립보드 유틸 CLCL 2.1.1 한글화? [7] 지후빠 1723 11 06-13
542 소프트웨어| ventoy.json 설정 팁. [11] 메인보드 1858 7 06-15
XE1.11.6 Layout1.4.8