윈 도 우 file_folder2Hide&show, vbe <--> vbs
2020.04.03 15:32
SendTo_copyfilefolder2Hide.vbs를 실행하여 ---file_folder2Hide---.vbs를 SendTo폴더에 복사
---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" 클릭
댓글 [2]
번호 | 제목 | 글쓴이 | 조회 | 추천 | 등록일 |
---|---|---|---|---|---|
[공지] | 강좌 작성간 참고해주세요 | gooddew | - | - | - |
4461 | 윈 도 우| 3. MS 인증 절차 - KMS 인증 [2] | 공피 | 46641 | 0 | 02-14 |
4460 | 소프트웨어| 한글,한컴오피스 2010 제품번호 미리 입력시키기 [11] | 손뉨 | 46048 | 0 | 03-29 |
4459 | 하드웨어| A.I_7을 통한 인증 최적화 [6] | 왔따다 | 45832 | 0 | 01-04 |
4458 | 윈 도 우| 작업관리자에서 프로세스종료가 안될시에는? [6] |
|
44483 | 0 | 12-27 |
4457 | 윈 도 우| USB로 XP 설치하기(AHCI 지원, USB CD 영역 불필요) [35] | 해밀 | 44466 | 16 | 05-04 |
4456 | 윈 도 우| 탐색기에서 라이브러리 제거해도 작동하는 슬라이드쇼 가젯??? [1] | Mir | 44268 | 0 | 03-19 |
4455 | 윈 도 우| 해적인증 사용하시는 분들은 8.1 업그레이드 하시면 안됩니다. [17] |
|
43326 | 0 | 10-18 |
4454 | 소프트웨어| 윈도우7 USER-PE로 윈도우7 을 설치하는 방법 1 [14] | 세리아 | 42041 | 6 | 06-22 |
4453 | 윈 도 우| 갓 모드(God Mode) [6] | PoLaRiS | 41890 | 0 | 03-21 |
4452 | 하드웨어| 삼성컴퓨터 메인보드 a/s 3년??? [13] |
|
41519 | 0 | 05-12 |
4451 | 윈 도 우| [누구나!다하는!] 윈도우 8 PE 빌더와 제작방법 (펀글) [13] |
|
40457 | 7 | 01-13 |
4450 | 윈 도 우| win7.wim+win8.wim이미지 통합부터 usb멀티 부팅 까지~(여... [35] | 까칠올챙이 | 39980 | 23 | 02-21 |
4449 | 윈 도 우| XP 드라이버 자동설치 [16] |
|
39852 | 3 | 01-21 |
4448 | 윈 도 우| 컴퓨터 성능 160%까지 끌어올리기 -1. 윈도우 최적화- [35] | ITforce | 38965 | 15 | 04-05 |
4447 | 윈 도 우| A.I를 이용한 KMS+Pirate 영구 인증법 [28] | 우금티 | 38873 | 22 | 11-29 |
4446 | 카리스마 조님 AI PDF 설명서 입니다 [5] | David K. L | 38593 | 0 | 02-02 |
4445 | 윈 도 우| 마지막 검색 세션이 에상치 못하게 종료 되었습니다. 꺼버... [5] | 삥뽕뚱 | 37858 | 0 | 04-04 |
4444 | 영구인증과 라이센스인증 확인 방법 [16] | ejhdytfwnh | 37855 | 0 | 07-31 |
4443 | 소프트웨어| 윈도우7과 Mac OS X 설치하고 멀티부팅까지 [32] |
|
36442 | 2 | 06-08 |
4442 | 윈 도 우| 종료, 재부팅 시 Sidebar 때문에 멈춘다면.. | 뚜버기 | 35585 | 0 | 08-28 |
수고 많으셨습니다. 감사합니다.