강좌 / 팁

윈 도 우 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 - - -
1968 윈 도 우| 원격 데스크톱..., 자격증명이 작동하지 않습니다... [1] 사가르마타 319 1 04-12
1967 윈 도 우| [실사] 윈도우8.1 프로 VHD 설치 방법 [5] 무월 423 6 05-08
1966 윈 도 우| vbs_Merge Lines(Drag-n-drop) [12] 레마클로 545 4 03-03
1965 윈 도 우| winpe에서 startis[all]back를 이용한 탐색기 색 변경 [14] sunshine 611 14 08-23
1964 윈 도 우| AdGuard 사용시 다나와 메뉴 폰트 깨지는 현상 [3] damoa 626 2 02-11
1963 윈 도 우| nircmd 활용 2개 [1] 레마클로 628 3 03-02
1962 윈 도 우| 아래 마우스 우측 재시작메뉴 하위 - 하위 메뉴넣기 영상입... [4] 코요88 630 3 11-22
» 윈 도 우| file_folder2Hide&show, vbe <--> vbs [2] 레마클로 631 8 04-03
1960 윈 도 우| rsimagex,gimagex에서 vmware map한 드라이브 안보일때 [4] 봉냐 638 3 02-21
1959 윈 도 우| 특정 폴더 내 임의 파일/폴더 선택 배치 함수 [10] 지후빠 698 16 01-29
1958 윈 도 우| CapsLock-toggle [7] 레마클로 700 4 03-20
1957 윈 도 우| Ventoy앞 Linux 뒤 [4] 메인보드 703 8 01-19
1956 윈 도 우| VMware로 설치한 윈7,8에서 Ophcrack 안돌려지는 경우 누군가 705 1 04-23
1955 윈 도 우| 특정 폴더목록 자동열기 배치파일 [2] 메리아 717 13 04-09
1954 윈 도 우| 레노버 노트북 충천USB 사용시 마우스 버벅거림 [1] 번개 722 1 03-26
1953 윈 도 우| korwbrkr.lex 파일없이 검색하기 [10] PC_Clinic 727 9 01-07
1952 윈 도 우| Windows 11에서 그룹화를 비활성화하는 방법 VᴇɴᴜꜱGɪ 737 2 06-10
1951 윈 도 우| 파일에 대한 썸네일 미리보기를 비활성화하지 않고 폴더 썸... 깨블리 786 2 05-31
1950 윈 도 우| 윈도우 계정/자동로그인 버그 해결 방법 사가르마타 792 0 04-12
1949 윈 도 우| Hex 비교 및 수정 스크립트 V1.60 (bincmp) [3] 히이이잌 794 8 12-24
XE1.11.6 Layout1.4.8