The disk defragmenter in Windows Vista leaves much to be desired. A couple of months ago, I recommended Auslogics'as a free alternative. What that program lacks is the ability to defrag just one or a select set of files and folders.
If you use Windows XP, the free Contig program from Mark Russinovich of Sysinternals fame (now owned by Microsoft) lets you ensure that an existing file is stored contiguously rather than fragmented onto different disk volumes. You can also use it to create a file that will remain contiguous.
Why would you want to defragment a single file? It may be one you open frequently, or it may be missed by disk defragmenters for any number of reasons, primarily that it is in use when the defrag occurs. A companion program from Russinovich called PageDefrag lets you defragment paging files and Registry hives that are inaccessible to other defraggers.
These programs are great for XP, but they don't work with Vista. For that OS, there's WinContig, a freebie from Marco D'Amato. The program works without having to create any installation files or Registry entries. Simply select the files or folders you want to defrag and click Analyze.
When the program finds a file in need of defragmentation, select it and click the Defragment button. WinContig offers to check the disk for errors before defragmenting, and if it finds any errors, it instructs you to correct them before it will proceed. Of course, you can run the defrag without the disk check as well.
The program lets you choose between two defrag "strategies": Quick or Smart. The difference is that the latter will attempt to minimize the number of file fragments if it can't find a single contiguous block of free space large enough to accommodate it. The author recommends using the Quick approach if you set Vista to defrag the disk weekly (the default setting).
There isn't an abundance of other features in the program, though you can create and load profiles for defragging the same files or folders repeatedly. You can also exclude files from being defragged. If you're curious, you can view an abundance of information about the number and location of the clusters in which a file is stored. That's a bit more information than I need, but you might find it useful.