질문과 답변

윈 도 우 윈도우7!!!!!에서 탐색기에 크기 항목에 파일뿐만 아니라 폴더 크기도 표시하기

2012.02.07 22:55

하루나 조회:5148

screenshot (1).jpg


제가 원하는 화면이 위 화면과 같은 상태입니다. 탐색기에 폴더 사이즈 항목에 파일과 폴더의 크기가 표시됩니다.


이 스샷은 '폴더 사이즈' 프로그램을 적용 시킨 화면입니다. 하지만 유감스럽게 이 프로그램은 윈도우7에는


적용이 안됩니다. ㅠㅠ 윈도우7에서도 탐색기에서 폴서 크기 알 수 있는 방법이 없나요???




저도 구글로 검색하면서 답을 구하고 있었는데 어느분이 스크립트로 할수 있다고 글을 올려 주셨는데 어떻게 적용하는지


모르겠습니다. 혹시 이걸 어떻게 적용하는지 해석해 주실수 있나요??


----------------------------------------------퍼온 댓글-------------------------------------------------------------


For those who like to roll their own,  this VB Script code will work with Windows 7 and show a simple list with folders and sizes from a cmd prompt.  You can specify the depth.  It's very fast.  Run with no parameters for instructions.

 

' ====================================================================

' DirSize7.vbs

' Used to display dir sizes in Windows 7 or XP.

'

' To Use:  cscript DirSize7.vbs C:\temp 4

'     Where:

'       First parm  = The dir to start with (default = script dir)

'       Second parm = number of child dirs to display (default = 4)

'

' 2010/7/20 - Tom Woodgerd - Upgraded from DirSizeXP.  Added code to handle folders with no access.

' ====================================================================

option explicit         ' Require declaration of variables.

 

Dim arrArgs

Dim strTopDir

Dim numDepth

Dim iii

Dim strEOL

Dim strTab

Dim ws

Dim fso

Dim strFolder

Dim arrFolderCollection1

Dim arrFolderCollection2

Dim arrFolderCollection3

Dim arrFolderCollection4

Dim strDisp

Dim strF1

Dim strF2

Dim strF3

Dim strF4

Dim strRootFolder

Dim int_strF1Size

 

Set ws = WScript.CreateObject ("Wscript.Shell")

 

strEOL = chr(10) & chr(13)

strTab = chr(9)

Set fso = CreateObject("Scripting.FileSystemObject")

 

' ---------------  Get command line arguments.

Set arrArgs = WScript.Arguments

 

' --------- Get folder from command line or if none, the script dir.

If arrArgs.Count > 0 Then

  strTopDir = arrArgs(0)

Else

  strTopDir = fso.GetParentFolderName(Wscript.ScriptFullName)

End If

 

' --------- Get depth from command line or default = 4.

If arrArgs.Count > 1 Then

  numDepth = arrArgs(1)

  If numDepth > 4 Then

    numDepth = 4

  End If

Else

  numDepth = 4

End if

 

If arrArgs.Count > 0 Then

  WScript.Echo "====================================================================++======"

  WScript.Echo "DirSize7:          Starting From: " & strTopDir & "    Depth = " & numDepth

  WScript.Echo ""

  WScript.Echo "=========================================================(Ver 7/20/2010)===="

Else

  WScript.Echo "======================================================================++===="

  WScript.Echo "DirSize7:          Starting From: " & strTopDir & "    Depth = " & numDepth

  WScript.Echo ""

  WScript.Echo "     Useage: cscript dirsize7.vbs D:\temp 3"

  WScript.Echo "     Where:"

  WScript.Echo "       Starting Directory = D:\temp"

  WScript.Echo "       Deepest folder to display = 3 (up to 4 max)"

  WScript.Echo ""

  WScript.Echo "==========================================================(Ver 7/20/2010)==="

End If

 

 

' --------- Main Loop ---------------------------------------------

Set strFolder = fso.GetFolder(strTopDir)

If Not strFolder.IsRootFolder then

  int_strF1Size = 0

  On Error Resume Next

  int_strF1Size = strFolder.size

  If int_strF1Size = 0 then       '--- See if we have access.

    WScript.Echo "----No Access---- "  & strFolder

    WScript.quit

  Else

    WScript.Echo f_AddCommas(strFolder.size), " "& strFolder

  end if

End If

 

Set arrFolderCollection1 = strFolder.SubFolders

For Each strF1 in arrFolderCollection1

  int_strF1Size = 0

  On Error Resume Next

  int_strF1Size = strF1.size

  If int_strF1Size = 0 then       '--- See if we have access.

    WScript.Echo " ----No Access---- "  & strF1

  Else

    WScript.Echo f_AddCommas(strF1.size), " "& chr(28)&" "& strF1

    If numDepth >= 2 Then '----------------------------- Start of 2nd level

      Set strFolder = fso.GetFolder(strF1)

      Set arrFolderCollection2 = strFolder.SubFolders

      For Each strF2 in arrFolderCollection2

        WScript.Echo f_AddCommas(strF2.size), "  "& chr(28)&" "& strF2

        If numDepth >= 3 Then '----------------------- Start of 3rd level

          Set strFolder = fso.GetFolder(strF2)

          Set arrFolderCollection3 = strFolder.SubFolders

          For Each strF3 in arrFolderCollection3

            WScript.Echo f_AddCommas(strF3.size), "   "& chr(28)&" "&  strF3

              If numDepth >= 4 Then '----------------- Start of 4th level

                Set strFolder = fso.GetFolder(strF3)

                Set arrFolderCollection4 = strFolder.SubFolders

                For Each strF4 in arrFolderCollection4

                  WScript.Echo f_AddCommas(strF4.size), "    "& chr(28)&" "&  strF4

                Next

              End If '--------------------------------- End of 4th level

            Next

        End If '----------------------------------- End of 3rd level

      Next

    End If ' ---------------------------------- End of 2nd Level

  End if

Next

 

' -------------------------- Format a numeric string with commas

Function f_AddCommas(parmStr)

  Dim strTemp

  ' ---- Drop the ".00"

  strTemp = left(formatcurrency(parmStr), Instr(formatcurrency(parmStr), ".")-1 )

  strTemp = mid(strTemp,2)  ' Drop the $

  f_AddCommas = space(15-len(strTemp)) & strTemp

End Function

-----------------------------------------------------------여기까지----------------------------------------------------

출처 : https://social.technet.microsoft.com/Forums/en/w7itproui/thread/ce998316-c210-4cdb-a38b-69be223a305f


우선 메모장으로 읽어서 모든파일 형식으로 vbs로 저장해서 명령프로토콜로 열어서 적용하는게 맞는지요??


번호 제목 글쓴이 조회 등록일
[공지] 질문과 답변 게시판 이용간 유의사항 gooddew - -
100229 비스타에서 cd굽는 법좀 알려주세요. secret 김영희 0 04-06
100228 비스타요ㅠㅠㅠㅠ secret 김예은 1 02-22
100227 windows vista 절전문제 secret 신기루 2 09-30
100226 윈 도 우| 즐겨찾기 배경화면 색상이 다름 문의 [1] 강남역5번 78 06-12
100225 소프트웨어| Debug Assertion Failed! Expression: vector subscript ou... 나는나다 87 05-09
100224 소프트웨어| 이노셋업 관련 gudiddooo 88 06-12
100223 소프트웨어| 삼성플로우 앱에서 스마트뷰가 로딩만 되고 실행이 되지 않... [2] 사가르마타 91 09-01
100222 소프트웨어| 아래에 크롬 로그인 버튼 누를 시 깨진다고 올렸던 글 해결... Fivernova 94 02-27
100221 소프트웨어| 서버 2019 빌드 17738 런타임 오류 조아저씨 95 08-27
100220 소프트웨어| 파워포인트(2016) 질문 드립니다 창공을훨훨 95 10-27
100219 소프트웨어| TS-Doctor에서 ts 파일 편집 시 채널 정보 보존할 수 없나요? 나는나다 95 05-28
100218 소프트웨어| Emeditor 단축키 질문입니다. [2] 파풍초 95 05-26
100217 소프트웨어| onenote에 mp4파일을 첨부할 수 있나요? brucex 96 03-25
100216 윈 도 우| 아이콘 및 잠금문의입니다. 감당못해 97 12-04
100215 모 바 일| 모바일에서 추천 단추 기수 97 06-19
100214 기 타| dropbox.com에 연결된 파일이 받아지지 않습니다 [1] UU自適 97 01-19
100213 소프트웨어| 360 internet security 성능은 어떤가요? 하츠 97 07-17
100212 소프트웨어| Avant Brower에서 화면갈무리 할수 있나요? zannabi 97 10-15
100211 소프트웨어| 프리미어에서 파일 import가 너무 오래 걸리네요? brucex 97 12-24
100210 소프트웨어| 만능윈도우 시 크롬 시작그룹 특정 페이지 또는 페이지 모... 넥스트타인 97 02-19
XE1.11.6 Layout1.4.8