강좌 / 팁

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

2020.04.03 15:32

레마클로 조회:630 추천: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 - - -
4449 기 타| [오토핫키 v1] 경로, 이름 ,드라이브명 등등 추출 함수 [2] 청락은복 818 8 03-06
4448 소프트웨어| 부팅항목숨기기,보이기-VHDman Lite0.0.8 [3] 카멜 528 10 03-06
4447 윈 도 우| 시스템 보호 설정 우클릭 메뉴 [13] 와로 1243 27 03-04
4446 소프트웨어| Bcd 항목 1회성 부팅하기-VHDmanLite [7] 카멜 723 15 03-04
4445 소프트웨어| Bcd부팅항목 메뉴 숨기기 [3] 카멜 434 9 03-04
4444 소프트웨어| 드라이버 백업&자동 설치 - WinNTSetup [17] 무월 1534 31 03-03
4443 소프트웨어| 오프라인 윈도우 드라이버 백업 [9] 카멜 1454 26 02-29
4442 윈 도 우| DISM 나의 윈도우 문제점 복구 [8] 마로94 1296 13 02-28
4441 윈 도 우| 윈도우 장치 드라이버 추출(백업) 명령어 [25] 컨피그 2574 64 02-23
4440 기 타| 컴퓨터 구매의 질문이 종종 보여서 나름의 팁을 얘기 합니다. [8] Boss 1893 5 02-19
4439 윈 도 우| 이 번 업데이트로 엣지에 추가된 사이드바 버튼 제거 [7] 고고추 2126 9 02-16
4438 윈 도 우| cmd 관리자 권한 실행과 특수문자 경로 문제 [9] 메리아 1066 12 02-14
4437 윈 도 우| 측면 버튼에 등록된 돋보기 기능... 기본값으로 복원 [2] 사가르마타 1046 0 02-10
4436 윈 도 우| 윈11 탐색기 메뉴삭제 [5] 진실 2358 19 02-06
4435 윈 도 우| 윈도우 탐색기 갤러리 안보이게 하는 방법 [1] 사가르마타 1549 2 02-05
4434 기 타| 한 드라이브에 윈도우(Atlas OS)까지 2개 설치하는 법(?) (... 누군가 1130 0 02-04
4433 기 타| 2024 새로운 시작, Rainmeter, 위젯, 바탕화면, 퍼포먼스 [16] 모네곰 2472 38 02-01
4432 윈 도 우| 윈도우10~11 알고리즘에 영향을 끼치는 이미지 파일 삭제 ... [2] risystem 2279 4 01-23
4431 윈 도 우| Windows11 트레이 아이콘 내맘대로... [9] 메인보드 3797 15 01-07
4430 기 타| 파워쉘로 WOL 수행 [3] JR.오펜하이 1445 9 01-06
XE1.11.6 Layout1.4.8