질문과 답변

윈 도 우 윈도우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 - -
4220 윈 도 우| XP 만능고스트 제작 관련 질문 드립니다 [5] refreshair 5138 01-15
4219 윈 도 우| V7 인증, 개조바이오스보다 좋을까요? [1] 잠자는곰주인 5138 03-25
4218 윈 도 우| 윈도우 7 잘 돌아갈까요? (펜티엄4 3.0 / 램2기가) [5] 참기름 5138 05-17
4217 윈 도 우| 지금 8.1 MAK 키가 공식적으로 나온건가요? [6] DOS 5138 09-09
4216 윈 도 우| XP에서 파티션 나누는 것에 대해서... [6] 우훗 5139 11-21
4215 윈 도 우| 윈도우 정식 인증 상태에서 오피스2013 KMSpico인증? [2] 샤방이 5140 12-01
4214 윈 도 우| 카리스마조님의 인증툴 ? [8] XP3 5141 01-23
4213 윈 도 우| SAS 하드에 XP 64Bit 설치 방법? [2] 김태용 5141 04-22
4212 로컬 영역 연결이 되질 않습니다 [6] 강주원 5142 10-10
4211 하드웨어| 고정종횡비 프로그램이 따로 있을까요? [3] 공피 5142 10-15
4210 기 타| 오피스2010 포터블 제작시 xp.7.x64 모두 작동되게 하려면? [1] 랄라탑 5142 02-02
4209 윈 도 우| win7과 IE8 응답없음 시간 줄이기 또는 해결? [2] 만쓰별 5144 12-10
4208 윈 도 우| 인증 방법 설명 이 정도면 괜찮을까요? [2] 공피 5144 12-24
4207 윈 도 우| 시스템 이미지 삭제 방법 좀 가르쳐주세요 [17] 정말이지.. 5145 04-06
4206 하드웨어| 부팅시 모니터 노시그널 문제 [1] 지안나 5146 07-07
4205 윈 도 우| slic2.0 [3] Randwick 5147 02-27
4204 윈 도 우| vhdx->vhd변환.. [3] 이주 5147 12-29
4203 정품인증 못받은 XP 로그온 불가 [5] XP 5148 02-07
4202 윈 도 우| ArcSoft TotalMedia Theatre Platinum 프로그램으로 영화을... [2] 늘상푸른 5148 05-10
4201 윈 도 우| 설치되어있는 윈도우7의 CDKEY를 찾는 방법 [5] BeMoreSee 5148 06-01
XE1.11.6 Layout1.4.8