윈 도 우 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 | - | - | - |
1968 | 윈 도 우| PrincePE_V18.5 [164] |
|
204984 | 99 | 02-02 |
1967 | 윈 도 우| PE 한글화 프로그램 (v1.0) [106] | ㄱㅇㄱㄱㅁ | 28010 | 89 | 06-25 |
1966 | 윈 도 우| 윈도우 10 설치, 최적화 및 기타 팁 100개 정리 [56] | 컴알못러 | 27743 | 79 | 01-26 |
1965 | 윈 도 우| PrincePE_V20 [52] |
|
2835 | 72 | 03-05 |
1964 | 윈 도 우| Windows 10 Ultimate (DREAM HS) [58] |
|
7353 | 70 | 08-14 |
1963 | 윈 도 우| 배치파일을 이용해서 윈도우 자동 설치하기 [22] | gooddew | 4960 | 70 | 10-16 |
1962 | 윈 도 우| WindowsXPE147-1빌더/나만의 PE를 만들자 시즌2 ?? 1탄 (... [59] | 지연서연아 | 2016 | 68 | 04-16 |
1961 | 윈 도 우| PrincePE_V19 [53] |
|
5096 | 65 | 02-15 |
1960 | 윈 도 우| 윈도우10 만능이미지 제작 메뉴얼 [43] | 질주민군 | 5585 | 64 | 11-19 |
1959 | 윈 도 우| 윈도우 장치 드라이버 추출(백업) 명령어 [25] | 컨피그 | 2713 | 64 | 02-23 |
1958 | 윈 도 우| 무인응답파일(autounattend.xml) 쉽게 만들기 [30] | 네오이즘 | 3851 | 60 | 12-31 |
1957 | 윈 도 우| PrincePE_V22 [53] |
|
6602 | 59 | 03-06 |
1956 | 윈 도 우| PE 드라이버 통합하기 V1.03 [41] | 히이이잌 | 5320 | 53 | 02-09 |
1955 | 윈 도 우| 나만의 PE를 만들자 실전편 1탄(윈도우 10PE빌드하기) [173] | 지연서연아 | 26358 | 51 | 08-27 |
1954 | 윈 도 우| 윈도우11 $OEM$소스 및 WinNTSetup 응용 설치! [40] | 무월 | 3462 | 49 | 02-03 |
1953 | 윈 도 우| [실시간 보호 기능 켬/끔] 좀 더 편하게 실행 [24] | 지후빠 | 3881 | 48 | 06-26 |
1952 | 윈 도 우| 키만 6번 누르세요~ [121] | 익덕이 | 9430 | 45 | 05-27 |
1951 | 윈 도 우| PrincePE_V21 [30] |
|
2449 | 45 | 03-06 |
1950 | 윈 도 우| [1탄] install.wim 누적 업데이트 통합 하기 [26] | 무월 | 1875 | 45 | 08-19 |
1949 | 윈 도 우| [실사] 단일 SSD(HDD)에서 윈도우 설치 하기! [20] | 무월 | 3946 | 45 | 10-14 |
수고 많으셨습니다. 감사합니다.