© J.C. Kessels 2009
MyDefrag Forum
June 19, 2013, 10:12:39 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
MyDefrag v4 Forum
>
Scripts, and other contributions
>
[Script] for Large Storage Drives /Updated + Alternate for Steam
Pages: [
1
]
2
« previous
next »
Print
Author
Topic: [Script] for Large Storage Drives /Updated + Alternate for Steam (Read 3851 times)
alttbm
JkDefrag Supporter
Posts: 15
[Script] for Large Storage Drives /Updated + Alternate for Steam
«
on:
August 22, 2011, 06:38:31 am »
Sorts Drive alphabetically
Starts with 50% of remaining space at beginning of drive
takes commonly use folders (specified) ad adds 5% of remaining HDD space for faster defrag next time
Sorts all other folders in between
you must specify folders that start with the same letter as common folders, using wild card will fail or re-sort them and remove the gap
Add in missing Letters And changes to for Directories needed
Version2 in Next post
Shortens Defrag by Up to 4 times
DataDiskMonthly used to Take me 4 days on me 4TB Stripe Drive I finished it with this Script overnight
Quote
Title('Sort By Use')
Description('
Sort all the files and directories by name on all the selected disk(s).
')
/* Select and process the volumes one by one. */
VolumeSelect
CommandlineVolumes()
VolumeActions
/* Write the "before" statistics to the logfile. See the "Settings.MyD" file
for the definition of the "LogBefore" string. */
AppendLogfile("MyDefrag.log","LogBefore")
/* Zone 1: Anime Directory */
MakeGap(ZoneBegin + VolumeFree * 0.5)
FileSelect
# Select everything in the "Anime" directory.
DirectoryName("Anime")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 2: Applications Directory */
FileSelect
# Select everything in the "Applications" directory.
DirectoryName("Applications")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 3: Directorys B - G */
FileSelect
DirectoryName("B*")
or DirectoryName("C*")
or DirectoryName("D*")
or DirectoryName("E*")
or DirectoryName("F*")
FileActions
SortByName(Ascending)
FileEnd
/* Zone 4: Games Directory */
FileSelect
# Select everything in the "Games" directory.
DirectoryName("Games")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 5: Directorys G - M */
FileSelect
DirectoryName("H*")
or DirectoryName("I*")
or DirectoryName("J*")
or DirectoryName("K*")
or DirectoryName("L*")
FileActions
SortByName(Ascending)
FileEnd
/* Zone 6: Movies Directory */
FileSelect
# Select everything in the "Movies" directory.
DirectoryName("Movies")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 7: Music Directory */
FileSelect
# Select everything in the "Music" directory.
DirectoryName("Music")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 8: Directorys M - P */
FileSelect
DirectoryName("N*")
or DirectoryName("O*")
FileActions
SortByName(Ascending)
FileEnd
/* Zone 9: Pictures Directory */
FileSelect
# Select everything in the "Pictures" directory.
DirectoryName("Pictures")
FileActions
# Add a gap of 5% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 10: Directorys P - T */
FileSelect
DirectoryName("Q*")
or DirectoryName("R*")
or DirectoryName("S*")
FileActions
SortByName(Ascending)
FileEnd
/* Zone 11: TV Shows Directory */
FileSelect
# Select everything in the "TV Shows" directory.
DirectoryName("TV Shows")
FileActions
# Add a gap of 05% of the free size of the volume.
AddGap(VolumeFree * 0.05)
SortByName(Ascending)
FileEnd
/* Zone 12: Directorys T - Z */
FileSelect
DirectoryName("U*")
or DirectoryName("V*")
or DirectoryName("W*")
or DirectoryName("X*")
or DirectoryName("Y*")
or DirectoryName("Z*")
FileActions
SortByName(Ascending)
FileEnd
AppendLogfile("MyDefrag.log","LogAfter")
VolumeEnd
AppendLogfile("MyDefrag.log","LogFooter")
Enjoy this
thanks to Darlis & Kasuha for the help
«
Last Edit: August 29, 2011, 05:10:20 am by alttbm
»
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #1 on:
August 22, 2011, 09:26:46 pm »
Version 2
Better Optimized
Alot Less Modification needed
Added Add Zone For MFT
Resizied MakeGap(ZoneBegin + VolumeFree * 0.5) to MakeGap(ZoneBegin + VolumeFree * 0.1) Moved to Zone 9
This Script is built to Trim the Defrag For Large Drives by having the User input commonly expanding Folder.
This way MyDefrag Can Identify these and Create space behind them so that after the initial defrag only those areas will be targeted.
the Folder Names I posted in the Example script here are Examples/Fillers.
more Sort Zones Cane be added with copy & paste + renaming the zone & renumber following ones.
any of these examples can be changed to any folder on the users PC IE. 'Anime' > 'Porn' It still works.
that all there is to it.
Including the Steam Script which is done Credit to Rohk
«
Last Edit: August 23, 2011, 04:18:35 pm by alttbm
»
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #2 on:
August 23, 2011, 05:09:55 am »
Its here
Only change 'commonly used' folders
Quote
Title('Sort By Use Version 2')
Description('
Sort all the files and directories by name on all the selected disk(s).
')
/* Select and process the volumes one by one. */
VolumeSelect
CommandlineVolumes()
VolumeActions
/* Write the "before" statistics to the logfile. See the "Settings.MyD" file
for the definition of the "LogBefore" string. */
AppendLogfile("MyDefrag.log","LogBefore")
/* Zone 1: Place the MFT and some other special NTFS files. */
FileSelect
SelectNtfsSystemFiles(yes)
FileActions
PlaceNtfsSystemFiles(Ascending,MftSize * 0.01)
FileEnd
/* Zone 2: Anime Directory */
FileSelect
# Select everything in the "Anime" directory.
DirectoryName("Anime")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 3: Applications Directory */
FileSelect
# Select everything in the "Applications" directory.
DirectoryName("Applications")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 4: Games Directory */
FileSelect
# Select everything in the "Games" directory.
DirectoryName("Games")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 5: Music Directory */
FileSelect
# Select everything in the "Music" directory.
DirectoryName("Music")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 6: Movies Directory */
FileSelect
# Select everything in the "Movies" directory.
DirectoryName("Movies")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 7: Pictures Directory */
FileSelect
# Select everything in the "Pictures" directory.
DirectoryName("Pictures")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 8: TV Shows Directory */
FileSelect
# Select everything in the "TV Shows" directory.
DirectoryName("TV Shows")
FileActions
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
SortByName(Ascending)
FileEnd
/* Zone 9: Directories Other */
MakeGap(ZoneBegin + VolumeFree * 0.1, DoNotVacate)
FileSelect
All
FileActions
SortByName(Ascending)
FileEnd
AppendLogfile("MyDefrag.log","LogAfter")
VolumeEnd
AppendLogfile("MyDefrag.log","LogFooter")
«
Last Edit: August 24, 2011, 11:36:40 am by alttbm
»
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
jeroen
Administrator
JkDefrag Hero
Posts: 7156
Re: New Script for Large Storage Drives
«
Reply #3 on:
August 23, 2011, 05:26:05 am »
I think you should change your zone 9. When a file has been selected for a zone it will automatically not be selected for next zones again. For example, files in your "Anime" folder are selected in your zone 1, so will not be selected again in other zones. So, in your last zone all you have to do is select "all" files, just like in the scripts that come with MyDefrag. This will select "all remaining files". At the moment your script does not do anything with remaining files, they are not optimized.
Logged
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #4 on:
August 23, 2011, 05:33:05 am »
Wow thanks I wasn't Sure so thought id be safe
so just
Quote
/* Zone 9: Directories Other */
FileSelect
All
FileActions
SortByName(Ascending)
FileEnd
)
Oh and working on Steam variant with Rohk's approval
for anybody that wants it
«
Last Edit: August 23, 2011, 05:38:32 am by alttbm
»
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
Kasuha
JkDefrag Hero
Posts: 595
Re: New Script for Large Storage Drives
«
Reply #5 on:
August 23, 2011, 05:46:27 am »
Your script is kind of a special-purpose one, anybody who's not using exactly your directory structure is probably not going to get anything better from it than from DataDiskMonthly. If you're making it public you should probably also describe what directory structure it assumes in better detail.
Logged
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #6 on:
August 23, 2011, 05:51:44 am »
Quote
you should probably also describe what directory structure it assumes in better detail
I'm Not Sure I follow
but I'd be glad to if I did
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
Kasuha
JkDefrag Hero
Posts: 595
Re: New Script for Large Storage Drives
«
Reply #7 on:
August 23, 2011, 08:55:02 am »
Quote from: alttbm on August 23, 2011, 05:51:44 am
I'm Not Sure I follow
Obviously.
Your script is a 'code', kind of which is not going to be useful for everyone's storage disk.
But uneducated user is not going to understand your script.
You should write a 'manual' for it, too, describing what it assumes about the disk and how is it supposed to be used. It doesn't have to be long but should be written in human language so that uneducated user understands what to expect from it.
Logged
Darlis
JkDefrag Hero
Posts: 1725
Re: New Script for Large Storage Drives
«
Reply #8 on:
August 23, 2011, 12:40:42 pm »
Instead of assuming that the user has directories like "Movies" and "TV-Shows", you could just select all video files like mpg, avi, etc., same with "Music".
Like Kasuha said, you have to write something like a manual that tells the user, for example, to change the "Application" and "Games" directory name, if the user has named them differently.
Logged
Need help creating a script? Try
MyDefrag Script Creator
.
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #9 on:
August 23, 2011, 04:12:33 pm »
Manual added
Steam Version Here
Quote
Title('Sort By Use Steam')
Description('
Sort all the files and directories by name on all the selected disk(s).
')
/* Select and process the volumes one by one. */
VolumeSelect
CommandlineVolumes()
VolumeActions
/* Write the "before" statistics to the logfile. See the "Settings.MyD" file
for the definition of the "LogBefore" string. */
AppendLogfile("MyDefrag.log","LogBefore")
/* Zone 1: Place the MFT and some other special NTFS files. */
FileSelect
SelectNtfsSystemFiles(yes)
FileActions
PlaceNtfsSystemFiles(Ascending,MftSize * 0.01)
FileEnd
/* Zone 2: Steam program files and no old cache files nor game files. */
FileSelect
DirectoryName("Steam")
and not(
(LastAccessEnabled(yes) and LastAccess(,1 month ago))
or DirectoryName("steamapps")
or DirectoryName("Backup")
or DirectoryName("dumps")
or DirectoryName("logs")
or DirectoryName("old")
or FileName("*.log")
or FileName("*.tmp")
)
FileActions
Defragment(Fast)
Defragment()
MoveUpToZone()
FastFill(WithShuffling)
AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01), DoNotVacate)
FileEnd
/* Zone 3: Steam game files no setups, savegames nor big ".gfc" files. */
FileSelect
DirectoryName("steamapps")
and not(
(LastAccessEnabled(yes) and LastAccess(,6 month ago))
or directoryname("directx")
or directoryname("dotnet")
or directoryname("*install*")
or directoryname("redist")
or directoryname("redistributable")
or directoryname("*save*")
or directoryname("support")
or directoryname("temp")
or filename("*.cab")
or filename("*.gcf")
or filename("*.ncf")
or filename("*inst*.exe")
or filename("*Physx*.exe")
or filename("*setup*.exe")
or filename("*vcredist*.exe")
)
FileActions
SortByName(Ascending)
FileEnd
/* Zone 4: Steam ".gcf" and ".ncf" files and savegames, and a gap. */
FileSelect
DirectoryName("steamapps")
and not(
(LastAccessEnabled(yes) and LastAccess(,6 month ago))
or directoryname("directx")
or directoryname("dotnet")
or directoryname("*install*")
or directoryname("redist")
or directoryname("redistributable")
or directoryname("support")
or directoryname("temp")
or filename("*.cab")
or filename("*inst*.exe")
or filename("*Physx*.exe")
or filename("*setup*.exe")
or filename("*vcredist*.exe")
)
FileActions
Defragment(Fast)
Defragment()
MoveUpToZone()
FastFill(WithShuffling)
AddGap(RoundUp(ZoneEnd,VolumeFree * 0.05), DoNotVacate)
FileEnd
/* Zone 5: Anime Directory */
FileSelect
# Select everything in the "Anime" directory.
DirectoryName("Anime")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 6: Applications Directory */
FileSelect
# Select everything in the "Applications" directory.
DirectoryName("Applications")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 7: Games Directory */
FileSelect
# Select everything in the "Games" directory.
DirectoryName("Games")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 8: Music Directory */
FileSelect
# Select everything in the "Music" directory.
DirectoryName("Music")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 9: Movies Directory */
FileSelect
# Select everything in the "Movies" directory.
DirectoryName("Movies")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 10: Pictures Directory */
FileSelect
# Select everything in the "Pictures" directory.
DirectoryName("Pictures")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 11: TV Shows Directory */
FileSelect
# Select everything in the "TV Shows" directory.
DirectoryName("TV Shows")
FileActions
SortByName(Ascending)
# Add a gap of 10% of the free size of the volume.
AddGap(ZoneEnd + VolumeFree * 0.1, DoNotVacate)
FileEnd
/* Zone 12: Directories Other */
MakeGap(ZoneBegin + VolumeFree * 0.05, DoNotVacate)
FileSelect
All
FileActions
SortByName(Ascending)
FileEnd
AppendLogfile("MyDefrag.log","LogAfter")
VolumeEnd
AppendLogfile("MyDefrag.log","LogFooter")
«
Last Edit: August 24, 2011, 11:41:48 am by alttbm
»
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
Darlis
JkDefrag Hero
Posts: 1725
Re: New Script for Large Storage Drives
«
Reply #10 on:
August 23, 2011, 04:25:02 pm »
Putting the Steam-Games behind all other files is not a good idea, imho. The read and write speed of a disk decreases towards the end and you do not want to waste "fast space" for video files.
Logged
Need help creating a script? Try
MyDefrag Script Creator
.
alttbm
JkDefrag Supporter
Posts: 15
Re: New Script for Large Storage Drives
«
Reply #11 on:
August 23, 2011, 04:40:59 pm »
Quote from: Darlis on August 23, 2011, 04:25:02 pm
Putting the Steam-Games behind all other files is not a good idea, imho. The read and write speed of a disk decreases towards the end and you do not want to waste "fast space" for video files.
there
forgot about that thanks
Logged
It's my enemies that drive me forward:
" Go ahead, say something intelligent. I dare you. "
BloodySword
JkDefrag Hero
Posts: 1114
Re: [Script] for Large Storage Drives /Updated + Alternate for Steam
«
Reply #12 on:
September 07, 2011, 11:40:42 am »
Thingsa like images, videos (including movies or episodes), music should NEVER be sorted.
I created a data script wich makes zones for each file type named above. Defragment(Fast), Defragment(), MoveUpToZone() wich gets files into the zone wich would not actually be moved by FastFill(WithShuffling). That's all you can do for data disks. For games I would suggest you to leave them on system partition or you have a second physical hard disk for them and use the system disk scripts. You should not mix games and data like videos on one drive or even partition.
«
Last Edit: September 07, 2011, 11:44:55 am by BloodySword
»
Logged
Greetings from Germany!
Kasuha
JkDefrag Hero
Posts: 595
Re: [Script] for Large Storage Drives /Updated + Alternate for Steam
«
Reply #13 on:
September 07, 2011, 01:28:58 pm »
Quote from: BloodySword on September 07, 2011, 11:40:42 am
Thingsa like images, videos (including movies or episodes), music should NEVER be sorted.
As usual you yet again consider your particular usage pattern the only one in the world.
I agree with you there's little point to sort videos and generally any large files as time needed to access such file is orders of magnitude shorter than time to read it.
Also there's little point to sort media files you intend to just view or listen to.
But if you need to perform batch operations with your images or music files often enough, then having them sorted is really good idea.
Logged
BloodySword
JkDefrag Hero
Posts: 1114
Re: [Script] for Large Storage Drives /Updated + Alternate for Steam
«
Reply #14 on:
September 07, 2011, 05:36:54 pm »
Quote from: Kasuha on September 07, 2011, 01:28:58 pm
Quote from: BloodySword on September 07, 2011, 11:40:42 am
Thingsa like images, videos (including movies or episodes), music should NEVER be sorted.
As usual you yet again consider your particular usage pattern the only one in the world.
I agree with you there's little point to sort videos and generally any large files as time needed to access such file is orders of magnitude shorter than time to read it.
Also there's little point to sort media files you intend to just view or listen to.
But if you need to perform batch operations with your images or music files often enough, then having them sorted is really good idea.
On hard disks since 2009 this is not a big problem. Even for batch converting they're fast enough that you won't notice much difference.
I work with VERY big pictures, PNG files with 130 MB or more (1200 dpi A3 pictures for poster usage or bigger) and I did not even notice any difference with the new 500GB hitachi hard disk (7K500) between fastfilling the zones and sorting. The performance gain is really too small that. Cost / use are not very good.
The PNG files does not have alpha channel and are compressed very little (only sub filter and ZLIB level 4). This makes decoding very fast, faster than the drive can read.
«
Last Edit: September 07, 2011, 05:39:45 pm by BloodySword
»
Logged
Greetings from Germany!
Pages: [
1
]
2
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...