강좌 / 팁

윈 도 우 file_folder2Hide&show, vbe <--> vbs

2020.04.03 15:32

레마클로 조회:632 추천: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 - - -
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 632 8 04-03
836 윈 도 우| Win PE에서 윈도우 UEFI설치를 합니다. [18] 하늘은높고 5140 30 04-05
835 기 타| 원격 PC 종료 [7] gooddew 3812 9 04-06
834 소프트웨어| (추가3) 클립보드로 파일명 복사, VBScript에서, 유틸 소개 [18] 지후빠 2087 11 04-06
833 소프트웨어| SD카드를 공장초기화로 포맷을 합니다. [6] 하늘은높고 3672 10 04-10
832 소프트웨어| 파일 이름으로 폴더 만들고 이동하기 [14] 지후빠 1901 15 04-10
831 윈 도 우| 확장자,숨김(OnOff - NoFile 레지) // 바탕아이콘 정렬문제... [6] 레마클로 1822 16 04-11
830 윈 도 우| 윈10 에 기본장착된 "사용자휴대폰" 앱으로 PC ... [28] 와니 6358 4 04-12
829 윈 도 우| [수정] RegOwnership 이용 : 레지소유권 얻기 <--> ... [9] 레마클로 1053 9 04-18
828 소프트웨어| 아이피 저장 복원 고정아이피 넣기 [14] 지룡자 1923 11 04-19
827 윈 도 우| 모니터 색감을 조절하자 - Aura(오라) [4] 깨블리 2696 6 04-20
826 기 타| 터미널창에서 일기 예보 보기 [7] gooddew 1603 10 04-20
825 윈 도 우| 크로뮴 엣지 일부 스트리밍 사이트 (DRM) 영상 재생 불가시 [3] 솔트 1800 8 04-21
824 윈 도 우| [추가]MoveOT_My설정_OnOff_v5 마지막버전 [34] 레마클로 1569 22 04-21
823 서버 / IT| Ubuntu, Linux Mint, Debian, Fedora 및 openSUSE에서 Virt... [1] VenusGirl 1037 4 04-25
822 기 타| MX linux 19.x 기본 설치 가이드 [1] VenusGirl 1745 6 04-26
821 소프트웨어| 파일 이름 일치시키기 개선 - VBS & VTool [7] 지후빠 1279 11 04-26
820 소프트웨어| 영상이름에 자막 매치시키기 오토핫키 [8] 비려막존 1173 8 04-27
819 하드웨어| 외장 SSD 비교 (삼성 T7 VS 샌디스크 E80) [4] 신세계 2844 3 04-27
818 윈 도 우| 윈도우 10 업데이트 이후 검은 화면(black screen) 해결법 [1] 김윈도 4717 3 04-27
XE1.11.6 Layout1.4.8