윈 도 우 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 | - | - | - |
4400 | 윈 도 우| [실사] VHD 교차부팅 수동&자동 등록 [18] | 무월 | 1975 | 32 | 10-07 |
4399 | 소프트웨어| EDGE 브라우저 창 크기 "최대화" 고정 하기 [1] | 미스라 | 1482 | 6 | 10-03 |
4398 | 윈 도 우| [갱신] 윈도우 11 로컬 계정 암호 변경 [14] | 무월 | 2244 | 18 | 09-27 |
4397 | 소프트웨어| 테라카피(Teracopy) 3.12 설치팁 [7] | 메리아 | 2318 | 17 | 09-27 |
4396 | 소프트웨어| PDF-XChange Editor 기본글꼴 바꾸기 [1] | 코리아선비 | 890 | 3 | 09-25 |
4395 | 윈 도 우| Windows 11에서 광고 팝업을 끄는 방법 [5] | VᴇɴᴜꜱGɪ | 3100 | 8 | 09-22 |
4394 | 소프트웨어| [포토샵] 인물 누끼따기 외곽선 정리 [12] | 무월 | 2555 | 37 | 09-20 |
4393 | 윈 도 우| 윈도우 11 로컬 계정 암호 재설정 [15] | 무월 | 1778 | 29 | 09-18 |
4392 | 윈 도 우| 윈도우11 에서 창 깜박거림이나 입력글자가 사라지는 경우 [5] | Named | 1558 | 2 | 09-14 |
4391 | 소프트웨어| PE 동영상 썸네일 표시 [3] | 히이이잌 | 674 | 16 | 09-14 |
4390 | 모 바 일| [팁] 카톡 '전화번호로 친구 추가 허용' 기능 추가 [2] | asklee | 1597 | 4 | 09-13 |
4389 | 윈 도 우| Microsoft는 최근 Windows 11 WinRE 업데이트가 실패한 이... [2] | VᴇɴᴜꜱGɪ | 1497 | 4 | 09-10 |
4388 | 윈 도 우| 바로가기 아이콘을 만들어 원 클릭으로 디펜더 온 오프 메... [8] | heykevin | 1298 | 20 | 09-09 |
4387 | 소프트웨어| 64bit 프로그램 한글화 강좌 [4] | 夕影 | 1757 | 7 | 09-09 |
4386 | 소프트웨어| [엑셀] 선택된 셀, 행, 열 강조 하기! [13] | 무월 | 2561 | 28 | 08-31 |
4385 | 소프트웨어| Microsoft Edge를 사용하여 YouTube 스크린샷을 찍는 방법 [3] | Security_Z | 1347 | 5 | 08-30 |
4384 | 윈 도 우| [실사] 윈도우 11 VHD 교차부팅(자동) 설정 - VHDMan [16] | 무월 | 1952 | 35 | 08-26 |
4383 | 소프트웨어| Microsoft Edge IE모드 구성하기 [10] | 무월 | 1837 | 22 | 08-26 |
4382 | 윈 도 우| [3탄] PE빌드를 위한 누적 업데이트 통합 (Winre.wim + ins... [14] | 무월 | 1275 | 26 | 08-25 |
4381 | 윈 도 우| 텍스트 파일 하위 폴더 파일 포함 병합하기! [11] | 무월 | 820 | 27 | 08-23 |
수고 많으셨습니다. 감사합니다.