윈 도 우 file_folder2Hide&show, vbe <--> vbs
2020.04.04 00: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 | - | - | - |
4164 | 소프트웨어| Primo Ramdisk 사용하기 [14] | 하늘보기 | 17762 | 23 | 05-28 |
4163 | 윈 도 우| Windows 8 정품인증 안하고 개인설정 하는 팁 [7] | 핑크맛우유 | 17725 | 4 | 09-21 |
4162 | 하드웨어| USB부팅도 안되는 구형보드에서 plop를 통해 윈도설치. [3] | 오펜하이머 | 17718 | 1 | 03-17 |
4161 | 서버 / IT| datafilehost.com 을 이용한 대용량 이미지 공유 [6] | gooddew | 17710 | 4 | 01-13 |
4160 | 윈 도 우| 윈도우 7 32비트 64비트 메모리 [9] | DOS | 17698 | 2 | 12-29 |
4159 | 윈 도 우| 방화벽으로 프로그램 아웃바운드 차단하기 [5] | wopd | 17650 | 7 | 12-01 |
4158 | 윈 도 우| Win8Mpe M 에서 Y드라이브의 용도는.... [6] | tara | 17641 | 4 | 02-28 |
4157 | 소프트웨어| 윈도우7 USER-PE 무선 랜카드 드라이버 설치방법 [2] | 세리아 | 17631 | 3 | 06-22 |
4156 | 소프트웨어| 윈7에서 프로그램 인터넷 차단 방법 [9] | 구들목 | 17601 | 3 | 05-03 |
4155 | [팁]사용자 권한 얻는방법[윈도우7 7100] [3] |
|
17587 | 0 | 05-08 |
4154 | 하드웨어| Phoenix BIOS (slic2.0을slic2.1)수정하기(SamSung) [1] | gooddew | 17558 | 0 | 06-17 |
4153 | 윈 도 우| 윈도 8 메트로 건너뛰고 바로 바탕화면으로 부팅하기 [10] |
|
17553 | 3 | 12-08 |
4152 | 윈 도 우| 윈도우8 스토어 앱 기본 설치 위치 변경하기 [14] | chkid | 17524 | 7 | 10-31 |
4151 | 윈 도 우| 작업 표시줄 좌측에 바탕화면 바로가기 아이콘 만들기 [4] | DOS | 17502 | 0 | 02-18 |
4150 | 기 타| 한글 첨부파일이 다운로드 안될때 | gooddew | 17491 | 1 | 09-11 |
4149 | 윈 도 우| 쉽고 빠르고 간단한 컴퓨터 최적화 팁! [27] | 핑크맛우유 | 17481 | 4 | 11-17 |
4148 | 소프트웨어| 임시폴더의 이동과 OS의 청결, 그리고.. [20] | GodFather | 17465 | 4 | 11-05 |
4147 | 윈 도 우| 윈도우XP IE8 초간단 "다운그레이드 후 재설치"... [2] |
|
17458 | 1 | 05-15 |
4146 | 윈 도 우| VHDman으로 교차부팅 이용하기 (WTG) [13] | 하늘보기 | 17439 | 15 | 04-29 |
4145 | Win7과 WinXP멀티부팅 하기 [19] | sp2 | 17355 | 0 | 09-22 |
수고 많으셨습니다. 감사합니다.