강좌 / 팁

윈 도 우 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 - - -
4157 윈 도 우| Windows 10 CMD 화면 클릭하면 진행이 안 됩니다 [4] suk 1429 12 10-28
4156 윈 도 우| NotePad 파일연결 레지스트리입니다. [12] PC_Clinic 1429 21 01-04
4155 소프트웨어| pureBasic 전원 단추 0357 - BIOS 설정. 인수 지정. 레지 등록 [13] update 입니다 1429 42 11-24
4154 소프트웨어| TC 선택한 파일명으로 폴더 만들기, 이동하기 [16] 지후빠 1431 7 09-14
4153 윈 도 우| 인터넷에 연결하지 않고도 Windows 11 장치를 설정할 수 있... VᴇɴᴜꜱGɪ 1432 8 02-23
4152 윈 도 우| 멀티부팅부터 Wimboot 만들기까지 (2부) [5] maniaa 1435 12 10-03
4151 소프트웨어| 단일 실행 파일 간단히 수정하는 팁 [7] 그루터기 1439 14 03-10
4150 윈 도 우| 폴더 및 파일 숨기기 컨텍스트 메뉴 ( 수정 ) [19] 슈머슈마 1447 9 02-26
4149 기 타| 특정 프로그램이 32비트? 64 비트? 여부 확인하기 [6] gooddew 1448 8 03-27
4148 모 바 일| 크로마키 무대배경 제작방법_ mobile PowerDirector murimgasa 1450 1 01-11
4147 소프트웨어| 슬기로운 스포티파이(Spotify) 생활 [4] 와로 1450 5 05-03
4146 기 타| 윈도우에서 예버튼이 안보이는 현상... 코요88 1454 4 08-22
4145 소프트웨어| 응답파일(unattend.xml) 교체 및 수정 - ChangeUnattend [14] 무월 1454 41 04-13
4144 소프트웨어| Adobe Premiere 강좌 Corner Pin, 동영상 화면크기 위치 조... [1] murimgasa 1459 2 08-20
4143 윈 도 우| 윈도우 11 시작 단추 화면에서 '맞춤' 없애는 방법 [1] 하늘은높고 1461 1 10-29
4142 윈 도 우| 우클릭 [새로 만들기] 날짜로 폴더/파일 만들기 [24] 지후빠 1462 23 05-26
4141 윈 도 우| [수정] MoveOT_My설정_onoff_v6.1 [fscapture용 추가] [6] 레마클로 1464 10 05-03
4140 서버 / IT| HTTrack Website Copier 사이트통으로 긁어 오기 [2] 슈머슈마 1468 6 01-30
4139 소프트웨어| 레인 스킨 변신 설명(테마 변경) [4] 갑파니 1470 5 07-19
4138 소프트웨어| wim boot 관련 배치 파일 몇 가지 팁 [19] 지후빠 1472 29 08-03
XE1.11.6 Layout1.4.8