강좌 / 팁

윈 도 우 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 - - -
561 소프트웨어| utorrent 간단 사용법 [3] 간장종지646 2516 12 01-11
560 하드웨어| 구형 메인보드에서 nvme SSD 사용하기 - BIOS [26] 디폴트 6144 12 02-05
559 윈 도 우| Windows Command Syntax - 문법 정리 [9] 오스 1344 12 01-28
558 윈 도 우| 배치파일로 윈도 설정과 관계없이 일정한 날짜 얻기 [6] 히이이잌 890 12 02-16
557 윈 도 우| 이거 여기 올려도 될지 [42] 슈머슈마 6268 12 07-17
556 윈 도 우| TotalCommander 단축키 도움말 [12] 슈머슈마 1321 12 07-18
555 소프트웨어| 한글2022 원클릭 설치하기.......CraXicS님 덕분에 가능해... [4] 밤이슬216 6560 12 02-07
554 윈 도 우| 무대뽀 UEFI PE 시스템 만들기(수정완료) [3] PC_Clinic 1691 12 12-25
553 윈 도 우| 윈도우 11/10, 빈폴더 무작위 생성 버그 해결하기 [12] gooddew 1390 12 11-20
552 윈 도 우| PE의 wim 부팅과 윈도우의 wimboot [wim 정보 비교] [9] suk 1415 12 05-06
551 기 타| 레인미터를 부팅하면 나오도록 등록했습니다. [12] 하늘은높고 2104 12 01-14
550 윈 도 우| 잘 안쓰는 window apps , 파워셀 명령어로 한번에 제거하기 [11] zerojiddu 2777 12 08-29
549 소프트웨어| [포토샵] 이중턱 보정 하기 [4] 무월 1973 12 04-03
548 윈 도 우| 윈도우 10/11에서 미디어 스트리밍 켜기 [5] 와로 2967 12 10-25
547 소프트웨어| VHD 에 윈도우 및 프로그램 설치 후 WIM 파일로 만들기 [6] 타천사둘리 2661 12 07-21
546 윈 도 우| 윈도우11 22H2 탐색기 탭 활성화 [9] 읍민Kaine 5088 12 10-03
545 하드웨어| USB 3.0 과 2.4GHz 간섭 문제 해결 - 동글을 연장선연결 [8] 메리아 3008 12 02-25
544 소프트웨어| 마우스 두개 양손 사용시 왼손 마우스 버튼 스왑 [7] 지후빠 1194 12 12-24
543 윈 도 우| 배치파일 명령어 > nul 2>&1 해석 [6] 컨피그 1242 12 01-11
542 소프트웨어| (ver 0.2) 크롬/엣지에서 URL 드래그 드롭으로 제목 얻기 [11] 메리아 1043 12 02-08
XE1.11.6 Layout1.4.8