강좌 / 팁

윈 도 우 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 - - -
640 윈 도 우| windows 11 자격증명으로 네트워크 공유하는법(수정) [6] 버금차. 2041 6 10-14
639 윈 도 우| Clover 작업 표시줄 아이콘 변경 [1] damoa 2037 1 11-16
638 윈 도 우| 절전모드가 자동 해제되는 경우 극약 처방 [17] suk 2035 5 03-03
637 소프트웨어| 윈도우를 다른 디스크에 복사하기 [20] gooddew 2034 40 03-20
636 윈 도 우| 시스템이 1~2분안에 절전모드로 들어가는 증상이 나타날때 [3] 태권V24 2032 2 04-08
635 윈 도 우| 카조님 PE에 파일 넣는 방법입니다. [12] 하늘은높고 2031 10 03-04
634 윈 도 우| 홈 에디션에 새 사용자 만들기 [5] suk 2031 3 09-18
633 소프트웨어| 이런 식의 포터블 런처는 어떨까요?(프로그램 있슴.) [7] 타락천사둘 2029 15 06-02
632 윈 도 우| ventoy 플러그인 "ventoy.json" 정리한것 (참... [9] 메인보드 2028 15 09-08
631 기 타| 태극 마크님의 1클릭 BCD 토커 원클릭 버튼 설정 [9] 슈머슈마 2027 10 02-01
630 모 바 일| [팁] 아이폰 뒷면 탭 기능 이용한 COVID-19 QR 코드 생성기 [3] asklee 2024 5 10-04
629 소프트웨어| Internet download manager 32분할로 다운로드 [6] ton3d 2024 9 06-19
628 소프트웨어| GNU GRUB 2.0.6 을 이용한 OS 설치 및 부팅 저장매체 만들기 [9] 메인보드 2019 17 02-02
627 기 타| 아크로니스 grub4dos에서 활용 [7] 나도간다 2017 4 06-01
626 윈 도 우| _Launch.exe 를 PE 에 적용해보기 [14] 지후빠 2014 22 04-15
625 소프트웨어| ACDSee Photo Studio Ultimate 2019에서 Flickr 활용하기 [3] win_10 2014 3 04-24
624 소프트웨어| MS Office 2019 에서 VBA(visual basic) 사용 팁 오호라7 2011 5 10-27
623 윈 도 우| 카리스마조님 Win10XPE34 를 USB에 구워넣기 [11] 하늘은높고 2010 5 03-04
622 소프트웨어| Windows 11, Windows 10 및 Windows 8.1용 바탕 화면 가젯 ... VₑₙᵤₛG 2006 2 07-16
621 기 타| IPv6 전용 네트워크에서 윈도우 포럼 접속하기 네트워크빌 2004 2 03-27
XE1.11.6 Layout1.4.8