강좌 / 팁

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

2020.04.03 15:32

레마클로 조회:670 추천: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 - - -
3666 소프트웨어| 파일 이름으로 폴더 만들고 이동하기 [14] 지후빠 1922 15 04-10
3665 소프트웨어| SD카드를 공장초기화로 포맷을 합니다. [6] 하늘은높고 3710 10 04-10
3664 소프트웨어| (추가3) 클립보드로 파일명 복사, VBScript에서, 유틸 소개 [18] 지후빠 2120 11 04-06
3663 기 타| 원격 PC 종료 [7] gooddew 3839 9 04-06
3662 윈 도 우| Win PE에서 윈도우 UEFI설치를 합니다. [18] 하늘은높고 5182 30 04-05
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 670 8 04-03
3660 윈 도 우| Move over there 등록_제거 final 2020-04-15 [51] 레마클로 2712 22 03-29
3659 하드웨어| 메인보드 모델명 확인하기 [5] gooddew 3674 22 03-28
3658 소프트웨어| 진행바와 함께 URL 다운로드 VBS + AHK [15] 지후빠 1384 10 03-28
3657 윈 도 우| Windows 10 버전별 CPU 지원 리스트.. [4] 은주얌 3128 4 03-27
3656 윈 도 우| Gpedit.msc는 무엇 이죠? (구글링) [4] 레마클로 1344 1 03-27
3655 기 타| 특정 프로그램이 32비트? 64 비트? 여부 확인하기 [6] gooddew 1468 8 03-27
3654 윈 도 우| 레노버 노트북 충천USB 사용시 마우스 버벅거림 [1] 번개 740 1 03-26
3653 윈 도 우| Move over there 우메뉴등록_제거 + 그룹정책 백복 [10] 레마클로 1213 11 03-25
3652 윈 도 우| 탐색기 화면에 글자가 부실해 보일 때 설정 방법 [1] 하늘은높고 1444 3 03-25
3651 소프트웨어| VBScript 기능 확장하기 개요 - API, COM server [8] 지후빠 1131 9 03-24
3650 소프트웨어| 압축 프로그램으로 삭제할 수 없는 파일 및 폴더 삭제하기 [7] 5테라 1810 15 03-23
3649 윈 도 우| 윈도우10 작업표시줄 시계 초 단위 표시하는 방법 [12] gooddew 3267 16 03-22
3648 소프트웨어| 디스크 다중 복사 ( HDCLONE ) [5] gooddew 2839 17 03-21
3647 윈 도 우| [스크립트] Windows 7 January 2020 ISO 만들기 [4] VenusGirl 2167 14 03-21
XE1.11.6 Layout1.4.8