정보 게시판










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

하루나
조회 수 : 638
2012.02.07 (22:55:01)

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

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

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


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


2012.02.07 23:07:09
YhK군

DirSize7.vbs이 C:\어쩌고저쩌고에 있으면

명령프롬프트에서

cscript DirSize7.vbs C:\어쩌고저쩌고 4

치라는 것 같은데여

끝에 4가 기본값인데, 이런개념같네여. "최대 하위폴더 4단계까지 표시"

예를 들어서 1이라고 하면, c:\program files\에서 탐색기열어놓고볼때

c:\program files\daum\폴더에 바로있는 파일들만 포함해 용량표시,

c:\program files\daum\potplayer폴더같이 2단계 하위폴더는 용량계산에서 제외하는

이런개념같내여

2012.02.07 23:22:32
rlfekmk

퍼포먼스에 상당한 손해를 볼것 같네요

2012.02.08 08:56:17
초월신

이 스크립트가 Explorer에 폴더크기를 보여주게 한다고 나와있나요?

그냥 폴더크기만 구해서 자체적으로 출력하는거 아닐런지.....


윈7에서는 IColumnProvider라고하는 컬럼 정보를 다루는 COM 인터페이스가 제거되었습니다.

즉, 정석적인 프로그래밍으로는 Explorer에 그런 기능을 넣을 수 있는 방법이 없다는 거죠.

굳이 가능하게 하자면, Explorer를 분석해서 코드를 변조시키고 일부 기능을 후킹해서

외부모듈을 집어넣어야 될 듯....(해킹의 영역입니다.)


굳이 그런기능이 필요하면 Xplorer2 라는 쉘 대체 프로그램을 사용하라고 하는군요.

-------------

MSDN에 따르면, 윈 비스타 이후로는 Property Handlers라는 방식을 사용하게 바뀌었다고 합니다.

즉, FolderSize라는 프로그램을 새 방식에 맞게 바꿔야 한다는거네요......

2012.02.08 16:28:53
꼬마야

그냥 토탈커맨더 쓰세요... 플러그인 깔면 됩니다. content 용이나 viewer용으로 있읍니다.

content plugin을 사용할려면 필요할때만 사용해야 합니다. 성능저하가 있읍니다.

content plugin 사용예

1.png


뷰어사용

2.png

번호 제목 닉네임 조회 등록일
29273 소프트웨어 | 노턴 인터넷 시큐리티 2012 평가판을 다운로드후 업데이트...
기러기
696 2012-02-07
Selected 윈도우 7 | 윈도우7!!!!!에서 탐색기에 크기 항목에 파일뿐만 아니라 폴... [4]
하루나
638 2012-02-07
29271 윈도우 7 | 아 윈7 엔터프라이즈 64bit 원본 구할때없나요? [3]
흐아
831 2012-02-07
29270 소프트웨어 | 노턴 인터넷 시큐리티 2012 와 노턴 360 버전 5.0 ... [2]
기러기
839 2012-02-07
29269 하드웨어 | 문의)) 24G 메모리를 사용할 경우~ 적당한 램디스크 용량은... [5]
chobits
977 2012-02-07
29268 윈도우 7 | 윈도우 이미지(wim)에 드라이버 끼워넣기 실패 ! [2]
id: id: 우금티
832 2012-02-07
29267 기타 | 윈7 64비트.... IE8 vs IE9 [24]
i2joa
1524 2012-02-07
29266 기타 | 윈도우7 베타버전 구합니다. [3]
coaert
1000 2012-02-07
29265 윈도우 7 | 디스플레이에 이렇게 표시되는게 정상인가여? [10]
항상초보
1017 2012-02-07
29264 소프트웨어 | ang 확장자 파일.... [5]
고씨
662 2012-02-07
29263 기타 | 이 자막 폰트 아시는 분? [1]
귀신
948 2012-02-07
29262 윈 비스타 | file-backed storage gadget
알미뜽
503 2012-02-07
29261 소프트웨어 | R-Studio 복구문의 [4]
정상고집
704 2012-02-07
29260 윈도우 XP | 폴더가 사라졌습니다. 해결 방법 좀 알려주세요.[미완료 ㅠ... [9]
blue9
889 2012-02-07
29259 소프트웨어 | ms sharepoint 에 대해서 설명해주실분.... [2]
이카디아
545 2012-02-07
29258 하드웨어 | 그래픽 카드 제품 평가 부탁드립니다. [3]
Prosumer
828 2012-02-07
29257 윈도우 7 | PE상에서 BIOS 업데이트 가능한가요?
rt402
730 2012-02-07
29256 소프트웨어 | applaus! V6 라는 프로그램 아시나요?
Mr.플라워
685 2012-02-07
29255 윈도우 8 | 윈8 설치가 안되네요. [3]
유기농
1113 2012-02-07
29254 윈도우 8 | 윈도우 8에서 입력기 문제 [2]
커피한사발
695 2012-02-06