강좌 / 팁

윈 도 우 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 - - -
3678 소프트웨어| 영상이름에 자막 매치시키기 오토핫키 [8] 비려막존 1173 8 04-27
3677 소프트웨어| 파일 이름 일치시키기 개선 - VBS & VTool [7] 지후빠 1272 11 04-26
3676 기 타| MX linux 19.x 기본 설치 가이드 [1] VenusGirl 1719 6 04-26
3675 서버 / IT| Ubuntu, Linux Mint, Debian, Fedora 및 openSUSE에서 Virt... [1] VenusGirl 1036 4 04-25
3674 윈 도 우| [추가]MoveOT_My설정_OnOff_v5 마지막버전 [34] 레마클로 1568 22 04-21
3673 윈 도 우| 크로뮴 엣지 일부 스트리밍 사이트 (DRM) 영상 재생 불가시 [3] 솔트 1795 8 04-21
3672 기 타| 터미널창에서 일기 예보 보기 [7] gooddew 1602 10 04-20
3671 윈 도 우| 모니터 색감을 조절하자 - Aura(오라) [4] 깨블리 2693 6 04-20
3670 소프트웨어| 아이피 저장 복원 고정아이피 넣기 [14] 지룡자 1921 11 04-19
3669 윈 도 우| [수정] RegOwnership 이용 : 레지소유권 얻기 <--> ... [9] 레마클로 1052 9 04-18
3668 윈 도 우| 윈10 에 기본장착된 "사용자휴대폰" 앱으로 PC ... [28] 와니 6351 4 04-12
3667 윈 도 우| 확장자,숨김(OnOff - NoFile 레지) // 바탕아이콘 정렬문제... [6] 레마클로 1821 16 04-11
3666 소프트웨어| 파일 이름으로 폴더 만들고 이동하기 [14] 지후빠 1897 15 04-10
3665 소프트웨어| SD카드를 공장초기화로 포맷을 합니다. [6] 하늘은높고 3665 10 04-10
3664 소프트웨어| (추가3) 클립보드로 파일명 복사, VBScript에서, 유틸 소개 [18] 지후빠 2079 11 04-06
3663 기 타| 원격 PC 종료 [7] gooddew 3808 9 04-06
3662 윈 도 우| Win PE에서 윈도우 UEFI설치를 합니다. [18] 하늘은높고 5122 30 04-05
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 631 8 04-03
3660 윈 도 우| Move over there 등록_제거 final 2020-04-15 [51] 레마클로 2661 22 03-29
3659 하드웨어| 메인보드 모델명 확인하기 [5] gooddew 3633 22 03-28
XE1.11.6 Layout1.4.8