강좌 / 팁

윈 도 우 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 - - -
259 기 타| [추가2] 파일/폴더들을 새로운 폴더 만들어 이동 VBS [13] 지후빠 1295 10 03-15
258 모 바 일| CX파일탐색기를 이용한 핸드폰과 PC 간 데이터 교환 [10] 읍민Kaine 1294 9 11-30
257 윈 도 우| PE에서 Edge 즐겨찾기 유지하기 [26] 선우 1289 12 03-16
256 윈 도 우| UWP Explorer - 터치 친화 파일탐색기 활성화 하기 (영어 ... [2] 블뤠버 1289 1 08-24
255 소프트웨어| 실컴에서 wim 생성이 실패하는 이유를 찾은 것 같습니다. [7] heykevin 1286 5 01-08
254 소프트웨어| [펌]VirtualBox 로컬 드라이브 연결하기 [2] 타천사둘리 1282 9 03-23
253 윈 도 우| RunOnceBoot VBScript Only [20] 지후빠 1277 11 02-20
252 윈 도 우| 바탕화면 내컴퓨터 및 휴지통 아이콘 제거하기 [11] PC_Clinic 1276 6 01-23
251 윈 도 우| [3탄] PE빌드를 위한 누적 업데이트 통합 (Winre.wim + ins... [14] 무월 1274 26 08-25
250 소프트웨어| 크롬/엣지에서 URL 드래그 드롭으로 제목 얻기 (ver 0.2.3,... [14] 메리아 1273 21 10-13
249 모 바 일| gos 문제해결 방법 [2] 해중이 1273 0 03-09
248 서버 / IT| Windows Server RDS 라이선스 활성화 및 구성 [7] 펨토 1273 1 04-15
247 윈 도 우| 폴더 깊이 제한하여 파일,폴더 찾기 배치 함수 [11] 지후빠 1272 15 01-12
246 소프트웨어| 파일 이름 일치시키기 개선 - VBS & VTool [7] 지후빠 1272 11 04-26
245 소프트웨어| 토탈커맨더 양쪽창 화면 비율 조절용 단축키설정 [18] 지후빠 1269 7 06-17
244 모 바 일| [강좌] Kinemaster 크로마키(chroma key) 배경합성 기법 murimgasa 1269 1 12-12
243 기 타| 한 폴더내의 wim 한번에 등록하기-vhdman [6] 카멜 1268 16 03-12
242 모 바 일| 카톡에서 내위치를 상대에게 보내는 방법- 카톡에서 나의 ... murimgasa 1268 1 08-13
241 모 바 일| #Kinemaster강좌, 손글씨로 다양한 글씨 효과 넣는 방법 무림거사 1267 0 07-09
240 기 타| PE DPI 조절 스크립트 V1.06ALL [5] 히이이잌 1265 14 03-02
XE1.11.6 Layout1.4.8