Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 23, 2013, 04:10:10 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Personal Games drive script  (Read 898 times)
antonyfrn
JkDefrag Senior
****
Posts: 42


View Profile
« on: May 19, 2012, 09:50:17 am »

Hi can someone take a look at these three scripts i made as ive been fiddling with them over time and see if anything can be done to improve or optimise them

ive attached the three files with this post below.

* GamesDiskDaily.MyD (5.51 KB - downloaded 47 times.)
* GamesDiskMonthly.MyD (5.39 KB - downloaded 45 times.)
* GamesDiskWeekly.MyD (5.92 KB - downloaded 39 times.)
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #1 on: May 19, 2012, 01:39:41 pm »

What I would change:

for monthly:
Add DoNotVacate for each gap. e.g. AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01), DoNotVacate)
Change SortByName to SortByLastChange on "one game" zones e.g.

Code:
  /* Zone 4: Diablo III. */
  FileSelect
    DirectoryPath("D:\Games\Diablo III")
  FileActions
    SortByLastChange(Ascending)
    AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01), DoNotVacate)
  FileEnd

for weekly and daily
add DoNotVacate for each gap expect the last one
and then use MoveUpToZone() on every zone

e.g.
Code:
  /* Zone 4: Diablo III. */
  FileSelect
    DirectoryPath("D:\Games\Diablo III")
  FileActions
    MoveUpToZone() 
    Defragment(Fast)
    FastFill()
    AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01), DoNotVacate)
  FileEnd

and last gap and last zone
Quote
    AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01))
  FileEnd
 
  /* Zone 3: all other files. */
  FileSelect
    all
  FileActions
    MoveUpToZone() 
    Defragment(Fast)
    FastFill()
  FileEnd

You also have the "Steam program files" zone twice. Remove one of them.
Logged
antonyfrn
JkDefrag Senior
****
Posts: 42


View Profile
« Reply #2 on: May 19, 2012, 03:53:49 pm »

sorry bit of a possible dumb question as im not that good with making these scripts what does "DoNotVacate" do exactly does work like this?

any files from the target directory are not moved from the zone? sorry cant think how to explain exactly how im thinking of it.
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #3 on: May 19, 2012, 04:10:24 pm »

From manual:
Quote
If all the next zones are sorted zones (using one of the SortBy fileactions) then DoNotVacate can be used, it will save some unnecessary data movements.

Nothing big but it saves some file movement when creating a gap and moving files upwards to each zone.

When you create a gap it is automatically vacated (all files inside the gap are moved upwards). If DoNotVacate is used then files inside the gap are left unmoved and can be moved upwards one by one to each zone using some of the SortBy methods or the MoveUpToZone() method.
Logged
antonyfrn
JkDefrag Senior
****
Posts: 42


View Profile
« Reply #4 on: May 19, 2012, 04:46:18 pm »

and last gap and last zone
Quote
    AddGap(RoundUp(ZoneBegin,VolumeSize * 0.01))
  FileEnd
 
  /* Zone 3: all other files. */
  FileSelect
    all
  FileActions
    MoveUpToZone() 
    Defragment(Fast)
    FastFill()
  FileEnd

You also have the "Steam program files" zone twice. Remove one of them.

should that be for all scripts? or just weekly/daily
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #5 on: May 20, 2012, 08:26:30 am »

should that be for all scripts? or just weekly/daily
For weekly and daily. That's how I do it. I just "push" up the last remaining files when creating the last gap in weekly and daily scripts. But you have to use MoveUpToZone in the last zone also, if you want to clear all the previously made gaps.
Logged
antonyfrn
JkDefrag Senior
****
Posts: 42


View Profile
« Reply #6 on: May 20, 2012, 09:29:37 am »

Could you take a quick look when you got a chance and see if i missed anything in these scripts

* GamesDiskDaily.MyD (5.2 KB - downloaded 36 times.)
* GamesDiskMonthly.MyD (5.33 KB - downloaded 41 times.)
* GamesDiskWeekly.MyD (5.55 KB - downloaded 37 times.)
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #7 on: May 20, 2012, 10:00:13 am »

Here's my changes, see if you like it or not. you missed few DoNotVacate and I changed all single game zones to use SortByLastChange.

That's all I got. Hopefully some else can help you further.

* GamesDiskDaily.MyD (5.23 KB - downloaded 56 times.)
* GamesDiskMonthly.MyD (5.37 KB - downloaded 62 times.)
* GamesDiskWeekly.MyD (5.59 KB - downloaded 56 times.)
Logged
antonyfrn
JkDefrag Senior
****
Posts: 42


View Profile
« Reply #8 on: May 20, 2012, 10:29:32 am »

cheers ill take a look tonight
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!