강좌 / 팁

윈 도 우 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 - - -
4143 소프트웨어| PE를 VHD에 설치하고 등록하기-vhdman [6] 카멜 1476 26 03-29
4142 윈 도 우| 배치파일 등에서 윈도우 32비트/64비트 구분 [7] 지후빠 1396 17 03-27
4141 윈 도 우| 윈도우 11 에서 시스템 요구 사항이 충족되지 않다고 하는 ... [6] gooddew 2469 14 03-24
4140 소프트웨어| Wake-on-Lan (Windows 10/11의 WOL) : 8단계에 걸친 완벽 ... [6] VᴇɴᴜꜱGɪ 2149 9 03-23
4139 윈 도 우| pe내장 크롬 설정파일 백업 복원하기.. [2] 센돔타오르 799 10 03-21
4138 윈 도 우| PE SSD에 설치하기. [3] 센돔타오르 2691 8 03-20
4137 모 바 일| 다음메일을 아웃룩에서 다음/카카오 통합 계정으로 접속하기 [1] asklee 2226 3 03-16
4136 윈 도 우| gooddew님 배치파일 강좌 [7] 슈머슈마 2524 19 03-16
4135 소프트웨어| rufus 3.18 사용법 (2가지) [24] suk 5933 55 03-14
4134 윈 도 우| HDD MBR - Bios 모드에 OS 버리고 PE 설치 [9] 메인보드 1832 13 03-13
4133 윈 도 우| HDD GPT-UEFI 모드에 OS 버리고 PE 설치 [8] 메인보드 2046 11 03-13
4132 윈 도 우| 노트북 터치패드(트랙패드) 비활성화 [3] 슈머슈마 931 5 03-12
4131 기 타| 한 폴더내의 wim 한번에 등록하기-vhdman [6] 카멜 1270 16 03-12
4130 하드웨어| GIGABYTE BIOS 복구하기 [3] 밤이슬216 1825 11 03-12
4129 소프트웨어| 폴드를 Y드라이브로 인식 시키기 [12] 그루터기 2046 23 03-11
4128 윈 도 우| 윈도우 부팅 오류 해결 [16] 메인보드 2207 22 03-11
4127 소프트웨어| 단일 실행 파일 간단히 수정하는 팁 [7] 그루터기 1430 14 03-10
4126 윈 도 우| 작업스케쥴러를 이용하여 UAC 우회하기 [11] 지후빠 888 10 03-09
4125 기 타| 커스텀 드라이브 아이콘 적용해 볼까? [3] 내꼬 559 5 03-09
4124 모 바 일| gos 문제해결 방법 [2] 해중이 1274 0 03-09
XE1.11.6 Layout1.4.8