강좌 / 팁

윈 도 우 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 - - -
4479 윈 도 우| 원격 데스크톱..., 자격증명이 작동하지 않습니다... [1] 사가르마타 251 1 04-12
4478 소프트웨어| pureBasic Glass 윈도우 및 버튼 021 [5] update 입니다 266 11 10:32
4477 소프트웨어| pureBasic 외부 함수 호출 [1] 입니다 344 9 03-25
4476 소프트웨어| purebasic 함수 인수 기본 값 설정으로 생략하기 [2] 입니다 347 9 03-24
4475 소프트웨어| pureBasic 포인트 기본 이해 [3] 입니다 355 10 03-25
4474 모 바 일| #Kinemaster강좌, Clip&Audio 자르기 이동 늘리기, Un... 무림거사 399 1 08-02
4473 소프트웨어| purebasic Macro 기본 [3] 입니다 403 9 03-25
4472 모 바 일| Kinemaster 강좌 -Clip을 "즐겨찾기"에 등록 &am... 무림거사 420 1 08-11
4471 윈 도 우| [실사] 윈도우8.1 프로 VHD 설치 방법 [5] 무월 422 6 05-08
4470 소프트웨어| purebasic 기본적인 변수, 함수 선언 [5] 입니다 441 11 03-24
4469 소프트웨어| Bcd부팅항목 메뉴 숨기기 [3] 카멜 451 9 03-04
4468 모 바 일| Kinemaster강좌 #글자 입력방법, #링 속도 줄이는 방법 무림거사 461 1 08-03
4467 모 바 일| Kinemaster 화살표 Arrow 표시하는 2가지 방법 무림거사 471 1 08-08
4466 모 바 일| #Kinemaster 강좌, 기기성능 에 따른 출력해상도, 출력화질... [1] 무림거사 488 1 08-13
4465 모 바 일| Mobile PowerDirector강좌 #크로마키 무대 제작방법 특강 [1] 무림거사 524 2 06-24
4464 소프트웨어| dup2patcher.dll 디컴파일링-2 [3] sunshine 541 5 07-21
4463 윈 도 우| vbs_Merge Lines(Drag-n-drop) [12] 레마클로 545 4 03-03
4462 소프트웨어| 부팅항목숨기기,보이기-VHDman Lite0.0.8 [3] 카멜 550 10 03-06
4461 기 타| 커스텀 드라이브 아이콘 적용해 볼까? [3] 내꼬 559 5 03-09
4460 소프트웨어| SDK(Software development kit) 에 대한 이해 [5] 입니다 565 7 03-27
XE1.11.6 Layout1.4.8