강좌 / 팁

윈 도 우 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 - - -
549 윈 도 우| CMD에서 휴지통으로 삭제 rm 과 폴더복사 cp [3] Neutrino 1857 4 02-18
548 윈 도 우| Auto Wim Make (만능윔 제작 방법) 4부 [7] 메인보드 1853 11 03-20
547 소프트웨어| Premiere CS6 강좌 04 작업창(workspace) 크기 위치 조절, ... [1] murimgasa 1853 0 09-25
546 기 타| [인공지능 - Ai] ANN, DNN, CNN, RNN 개념과 차이 [3] elios 1852 4 12-29
545 기 타| LinuxMint LMDE 4 “Debbie” 미리보기 [5] VenusGirl 1849 11 02-26
544 윈 도 우| ClassicShell 바탕화면 항목 메뉴로보기 생성 AlphaGo 1849 2 10-01
543 윈 도 우| cmd 스크립트서 레이블명으로 드라이브 찾기 [1] Neutrino 1847 6 12-25
542 윈 도 우| 저해상도 게임 실행시 각종 창 크기 작아지는 증상 해결 방법 [3] 오호라7 1845 3 05-12
541 소프트웨어| ★ Premiere CS6 강좌 06 프리미어 편집기초와 단축키 설명 murimgasa 1845 0 09-29
540 모 바 일| 스마트폰 글꼴 바꾸기,서체 변경하는 방법 강좌 murimgasa 1844 1 09-14
539 기 타| wget으로 다운로드 가능한 클라우드 [4] 히이이잌 1843 6 04-11
538 소프트웨어| 레인미터 날씨 스킨 풍속표시 시속(km/h)을 초속(m/sec)으... [5] 유기농7 1842 3 01-13
537 소프트웨어| UPX 압축풀기 [5] sunshine 1842 9 10-07
536 소프트웨어| ventoy.json 설정 팁. [11] 메인보드 1841 7 06-15
535 모 바 일| [Tip] QR 코드로 와이파이 SSID와 비번 입력하기 [5] asklee 1836 8 02-09
534 윈 도 우| [1탄] install.wim 누적 업데이트 통합 하기 [26] 무월 1835 45 08-19
533 소프트웨어| [엑셀팁] 숫자를 숫자 <-> 문자 포멧 전환하기 [6] 지후빠 1833 4 02-09
532 윈 도 우| Windows 10 클립보드 기록 - 버전1809 부터 홈에서도 가능 [6] suk 1833 4 07-22
531 윈 도 우| HDD MBR - Bios 모드에 OS 버리고 PE 설치 [9] 메인보드 1830 13 03-13
530 서버 / IT| 오토셋과 굿빌더로 홈페이지와 홈쇼핑을 한꺼번에 [3] 엘레간트 1826 2 10-20
XE1.11.6 Layout1.4.8