Results 1 to 4 of 4

Thread: Script to increase MFT allocation size

  1. #1
    mbucari1's Avatar Poster BT Rep: +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35
    Join Date
    Jan 2007
    Age
    37
    Posts
    2,477
    Ok, I wrote this script to increase the allocation size of window's Master File Table. It's useful to have a buffer in the MFT so that it won't fragment as easily. A fragmented MFT leeds to slower file access time. If you've just formated a Hard Drive and want to give your new MFT a buffer, or want to keep your OS disk running fast, give this a try

    Copy the script and paste it into a text file.
    Save it as something.bat.
    Run the batch file.
    You will be asked by how much you want to increase the MFT. For system drives I'd suggest ~50000. Storage Drives I'd suggest 100000 if you plan for MANY small files or 30000 if you plan for fewer large files.


    Code:
    @echo off
    set /p input="Enter Size of desired MFT padding in KB   "
    cls
    set percent=%input%
    set /a percent/=100
    set c=1
    mkdir mft
    cd mft
    :s
    set /a n+=1
    echo. > %n%
    if %n%==%input% goto e
    set x=%percent%
    set /a x*=%c%
    if %n%==%x% goto math
    goto s
    :math
    cls
    echo %c%%% Complete
    set /a c+=1
    goto s
    :e
    cd ..
    rmdir mft /s /q
    Last edited by mbucari1; 03-06-2008 at 10:29 PM.

  2. Software & Hardware   -   #2
    peat moss's Avatar Software Farmer BT Rep: +15BT Rep +15BT Rep +15
    Join Date
    May 2003
    Location
    Delta B.C. Canada
    Posts
    10,547
    Did n't Diskeeper use to have this option ? I don't see it in the latest version 2008 . I think its controlled by Frag Shield now . It was one of the first things I did after installing tho .

    I'd like to try this mbucari1 on a clean install just for shits and giggles , thank you .


    Oh great now I have that Iron Butterfly tune running thru my head ......
    Last edited by peat moss; 03-07-2008 at 02:25 AM.

  3. Software & Hardware   -   #3
    mbucari1's Avatar Poster BT Rep: +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35
    Join Date
    Jan 2007
    Age
    37
    Posts
    2,477
    Quote Originally Posted by peat moss View Post
    Did n't Diskeeper use to have this option ? I don't see it in the latest version 2008 . I think its controlled by Frag Shield now . It was one of the first things I did after installing tho .

    I'd like to try this mbucari1 on a clean install just for shits and giggles , thank you .


    Oh great now I have that Iron Butterfly tune running thru my head ......
    Hope it works well for ya. Don'tcha know that I'll always be true, PM?

  4. Software & Hardware   -   #4
    hdogg
    Guest
    Great stuff mbucari1. I never would have thought to modify MFT in this manner.

    I modified your original script slightly as I was making a 6.5GB MFT (i.e. 6.5 million files) and explorer/system didn't like that many files in one folder when I went to rename the folder (long story). So I decided to create a new folder whenever it reached 50000 files.

    @echo off
    set /p input="Enter Size of desired MFT padding in KB: "
    cls
    md mft
    cd mft
    set /a fc=1
    set /a n=1
    call :mkdir

    :s
    echo. > %n%
    set /a percent=%n%*100/%input%
    cls
    echo %percent%%% Complete
    if %n%==%input% goto :end
    set /a n+=1
    set /a c+=1
    if %c%==50000 call :mkdir
    goto :s

    :mkdir
    cd %~dp0
    md mft%fc%
    cd mft%fc%
    set /a fc+=1
    set /a c=0
    goto :eof

    :end
    cd %~dp0
    pause
    for /D %%a in (%~dp0\mft*) do rd /s /q %%a
    Last edited by hdogg; 02-13-2009 at 12:30 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •