Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 19, 2013, 08:43:58 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: problem with placing specific files within a specific zone  (Read 1039 times)
mark4th
Newbie
*
Posts: 2


View Profile
« on: May 09, 2011, 07:27:52 am »

I have modified the system monthly script by adding a zone 6.  to this zone I want all VDI files (virtual disk images) and some other LARGE files.  Problem is, mydefrag does not honor the request to place these files in zone 6 unless I also specifically add a exclusion rules to ALL OTHER ZONES!!!!!!!!!!!!!

If I have specifically added a file/files/sub directory to a specific zone then mydefrag should KNOW not to place those files in an earlier zone without my having to add exclusion rules to all other zones!!!
Logged
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #1 on: May 09, 2011, 07:39:43 am »

I have modified the system monthly script by adding a zone 6.  to this zone I want all VDI files (virtual disk images) and some other LARGE files.  Problem is, mydefrag does not honor the request to place these files in zone 6 unless I also specifically add a exclusion rules to ALL OTHER ZONES!!!!!!!!!!!!!

If I have specifically added a file/files/sub directory to a specific zone then mydefrag should KNOW not to place those files in an earlier zone without my having to add exclusion rules to all other zones!!!
I think before using capitalizations and exclamation marks it is better first to learn how Mydefrag is designed and how it works. It is not MyDefrag fault it does not do what you want or what you suppose it should do. It does, what you have told it to do. Do not tell MyDefrag to do what you do not want.

Files are put to the first zone where the files meet selection criteria, no matter if explicit or general. How can MD know that you do not want to put the files to zone6 only if do not meet previous criteria ?

You have basically 2 options:
-either use exclusion rules as you already have.
-either break zone sequence by usage of 2 occurence of makegap command ( with DoNotVacate parameter ) and placing zone 6 definition before zone 1.

But the 1st option is more flexible as it can adapt to variable size of the previous zones.
Furthermore you can define a macro or an include file to have a single definition of the file exclusion, in case that can vary during the time.
« Last Edit: May 09, 2011, 07:52:15 am by poutnik » Logged

It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
mark4th
Newbie
*
Posts: 2


View Profile
« Reply #2 on: May 09, 2011, 06:07:36 pm »

Ok well I still think that if i say "put this file in zone 6" it should not be placed anywhere other than zone 6 :/

also... even after putting exclusions for the files in all other zones zone 6 is never processed.  I see the defrag do zones 1, 2, 3, 5 and then display "Finished".  That means that about 1/4 of my drive is now in nice neat order and 3/4 of my drive is a cluster*$(^$ of scatterd fragments.

what did i do wrong here??

< snip >
  /* Zone 1: Place the MFT and some other special NTFS files. */
  FileSelect
    SelectNtfsSystemFiles(yes)
  FileActions
    PlaceNtfsSystemFiles(Ascending,MftSize * 0.1)
  FileEnd

  /* Zone 2: Directories. */
  FileSelect
    Directory(yes)
  FileActions
    SortByName(Ascending)
  FileEnd

  /* Place files at the beginning of the disk. */
  MakeGap(0)

  /* Zone 3: files used when booting, and a gap. */
  FileSelect
    ImportListFromBootOptimize()
  FileActions
    SortByImportSequence(Ascending)
    AddGap(RoundUp(ZoneEnd,VolumeFree * 0.01))
  FileEnd

  /* Zone 4: files used by the most used programs, and a gap. */
  FileSelect
    ImportListFromProgramHints("*.pf")
    and not(
      FileName("*.MPQ")
      or FileName("*.7z")
      or FileName("*.arj")
      or FileName("*.avi")
      or FileName("*.bz2")
      or FileName("*.cab")
      or FileName("*.chm")
      or FileName("*.dvr-ms")
      or FileName("*.gz")
      or FileName("*.ifo")
      or FileName("*.iso")
      or FileName("*.lzh")
      or FileName("*.mp3")
      or FileName("*.msi")
      or FileName("*.pdf")
      or FileName("*.rar")
      or FileName("*.rpm")
      or FileName("*.tar")
      or FileName("*.wav")
      or FileName("*.wmv")
      or FileName("*.vob")
      or FileName("*.z")
      or FileName("*.zip")
      or FileName("*.mp3")
      or FileName("*.vdi")
    )
  FileActions
    SortByImportSequence(Ascending)
    AddGap(RoundUp(ZoneEnd,VolumeFree * 0.01))
  FileEnd

  /* Zone 5: regular files and a gap. */
  FileSelect
    not(
      Size(5000000,0)                      /*** i removed a zero from this number */
      or (LastAccessEnabled(yes) and LastAccess(,1 month ago))
      or DirectoryName("$RECYCLE.BIN")
      or DirectoryName("RECYCLED")
      or DirectoryName("RECYCLER")
      or DirectoryName("$*")
      or DirectoryName("Downloaded Installations")
      or DirectoryName("Ehome")
      or DirectoryName("Fonts")
      or DirectoryName("Help")
      or DirectoryName("I386")
      or DirectoryName("IME")
      or DirectoryName("Installer")
      or DirectoryName("ServicePackFiles")
      or DirectoryName("SoftwareDistribution")
      or DirectoryName("Speech")
      or DirectoryName("Symbols")
      or DirectoryName("ie?updates")
      or DirectoryName("dllcache")
      or DirectoryName("Installshield Installation Information")
      or DirectoryName("System Volume Information")
      or DirectoryName("windows.old")
      or FileName("*.MPQ")
      or FileName("*.7z")
      or FileName("*.arj")
      or FileName("*.avi")
      or FileName("*.bz2")
      or FileName("*.cab")
      or FileName("*.chm")
      or FileName("*.dvr-ms")
      or FileName("*.gz")
      or FileName("*.ifo")
      or FileName("*.iso")
      or FileName("*.lzh")
      or FileName("*.mp3")
      or FileName("*.msi")
      or FileName("*.pdf")
      or FileName("*.rar")
      or FileName("*.rpm")
      or FileName("*.tar")
      or FileName("*.wav")
      or FileName("*.wmv")
      or FileName("*.vob")
      or FileName("*.z")
      or FileName("*.zip")
      or FileName("*.mp3")
      or FileName("*.vdi")
      )
  FileActions
    SortByName(Ascending)
    AddGap(RoundUp(ZoneEnd,VolumeFree * 0.01))
  FileEnd

  /* Zone 6: spacehog files (less important files that take up a lot of space). */
  FileSelect
  (
      FileName("*.MPQ")     /**** its the MPQ and VDI that i want defragged to here the rest is not as important */
      and FileName("*.vdi")
      and FileName("*.7z")
      and FileName("*.arj")
      and FileName("*.avi")
      and FileName("*.bz2")
      and FileName("*.cab")
      and FileName("*.chm")
      and FileName("*.dvr-ms")
      and FileName("*.gz")
      and FileName("*.ifo")
      and FileName("*.iso")
      and FileName("*.lzh")
      and FileName("*.mp3")
      and FileName("*.msi")
      and FileName("*.pdf")
      and FileName("*.rar")
      and FileName("*.rpm")
      and FileName("*.tar")
      and FileName("*.wav")
      and FileName("*.wmv")
      and FileName("*.vob")
      and FileName("*.z")
      and FileName("*.zip")
      and FileName("*.mp3")
  )
  FileActions
    SortByName(Ascending)
  FileEnd

< /snip >
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #3 on: May 09, 2011, 06:21:11 pm »

You have to replace every "and" in zone 6 with "or". Then it'll work as you would expect.
You have to read "FileName("*.MPQ") and FileName("*.vdi")" as "Select all files that have the extensions MPG and VDI", and since no file has two extensions, this will select nothing. Wink

You should also exclude these files from zone 3 as well.
Logged

Need help creating a script? Try MyDefrag Script Creator.
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #4 on: May 09, 2011, 06:30:00 pm »

You know, computer language differs from the human one not only by syntax, but also by meaning.

Lets symbolically have 3 model zones zones

1: filename(*.doc) and lastchange( 1 month ago)
2: filename("mythe onlyspecialfile.doc")
3: filename("*.doc")

Do you see the ambiquity of the description ? the 2 possible interpretation ?
you cannot want MD to read your mind...

And, it is related to your zone 6 too.

In computer world the operator AND, according to boolean logic,
means both expressions have to be true.

Does have any of your files all the listed extensions at once ? I highly doubt so.
the OR is what should be used, with meaning of any of options.

Edit: Darlis was less talkative and therefore faster.   Grin
Logged

It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
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!