Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 24, 2013, 02:58:16 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: Need help: specific Files/Folders allowed sizes for zones, properly  (Read 667 times)
computerguy
JkDefrag Supporter
***
Posts: 10


Chat with me live 247


View Profile WWW
« on: October 07, 2011, 08:10:23 am »

My question is how to apply certain files/folders with size caps to a specific zone. I want to know if this means only selected files/folders with in the size limit will be put into this zone or if it means all files on the drive with in 100mb with the additional selected files & folders with it.

Code:
/*Only selects files/folders up to 100mb in following directories + excludes some files*/
 Size (0,100000000)
      DirectoryPath("C:\ProgramData\*")
  and DirectoryPath("C:\Program Files\*")
  and FileName("*.wav")
  and DirectoryPath("C:\Program Files\Norton AntiVirus")
  and DirectoryPath("C:\Program Files\Kaspersky Lab")

& NOT
     (FileName("*.mp3")
   or FileName("*.wav")
   or FullPath("F:\Music","*")
   or DirectoryPath("C:\Music"))
FileActions
    SortByLastAccess(Ascending)
    AddGap(ZoneEnd + VolumeSize * 0.01)
FileEnd

Now my question is, will that specify every file 100mb on the drive in that zone along with those specific files, or is it telling that zone only those specific files with in that size range can go there. I only want selected files and folders with a limit size in a selected zone with excluded files, and it should look like the script above. Now will this work? Please Reproduce a working script of this one if possible as a repost or upload.

Please IM me here for instant feedback@:
http://webmessenger.yahoo.com/?im=zachreynolds5

* Professional BETA updated.MyD (44.16 KB - downloaded 24 times.)
« Last Edit: October 07, 2011, 03:57:49 pm by computerguy » Logged

Check my website @ http://www.computersolutions.spruz.com. IM me live 247 http://webmessenger.yahoo.com/?im=zachreynolds5. I am a technology enthusiast. I boost computers by 70% on average.
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #1 on: October 07, 2011, 11:46:51 am »

Now my question is, will that specify every file 100mb on the drive in that zone along with those specific files, or is it telling that zone only those specific files with in that size range can go there.
Actually, it will select nothing because a file can't have more than one extension i.e. a file can't end with ".7z" and ".arj" and ...

Code:
  /* Select all files bigger than 100mb and additionally all archive files */
  FileSelect
    Size(100MB, 0)
    or FileName("*.7z")
    or FileName("*.arj")
    or FileName("*.bak")
    or FileName("*.bup")
  ...

  /* Select all archive files that are bigger than 100mb */
  FileSelect
    Size(100MB, 0)
    and ( FileName("*.7z")
      or FileName("*.arj")
      or FileName("*.bak")
      or FileName("*.bup")
    )
    ...

By the way I read ZONE222G http://www.mydefrag.com/Scripts-Variables.htm = The size of all files + folders in the zone (fragmented + unfragmented). I am not sure how to use it though.
That depends on what you want to do with it. You can only use it inside a FileAction, though. The value depends on the files that have been selected, so you can't use it in a FileSelect.

I am having a few problems as is, so I am making sure this is not another sorting issue with my script. Help is much appreciated and please, if you do not know for sure please do not comment or speculate, my script is big enough as is.
You would surely help yourself and us if you would post the complete script and told us what you actually want to accomplish. The forum is there to help but you have to help us to help you.  Wink
Logged

Need help creating a script? Try MyDefrag Script Creator.
computerguy
JkDefrag Supporter
***
Posts: 10


Chat with me live 247


View Profile WWW
« Reply #2 on: October 07, 2011, 12:01:18 pm »

My question is how to apply certain files/folders with size caps to a specific zone. I want to know if this means only selected files/folders with in the size limit will be put into this zone or if it means all files on the drive with in 100mb with the additional selected files & folders with it.

Code:
/*Only selects files/folders up to 100mb with selected following directories + excludes some files for this zone?*/
  FileSelect
    Size(100MB, 0)
    and ( FileName("*.7z")
      or FileName("*.zip")
      or FileName("*.iso")
      or DirectoryPath("C:\zip"))

    & NOT (FileName("*.mp3")
        or FileName("*.wav")
        or FullPath("F:\Music","*")
        or DirectoryPath("C:\Music"))
        or Size(0, 100MB)
FileActions
    SortByLastAccess(Ascending)
    AddGap(ZoneEnd + VolumeSize * 0.01)
FileEnd

Now my question is, will that specify every file 100mb on the drive in that zone along with those specific files, or is it telling that zone only those specific files with in that size range can go there. I only want selected files and folders with a limit size in a selected zone with excluded files, and it should look like the script above. Now will this work? Please Reproduce a working script of this one if possible as a repost or upload.

Please IM me here for instant feedback@:
http://webmessenger.yahoo.com/?im=zachreynolds5

* Professional BETA updated.MyD (44.16 KB - downloaded 30 times.)
« Last Edit: October 07, 2011, 03:57:35 pm by computerguy » Logged

Check my website @ http://www.computersolutions.spruz.com. IM me live 247 http://webmessenger.yahoo.com/?im=zachreynolds5. I am a technology enthusiast. I boost computers by 70% on average.
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #3 on: October 07, 2011, 06:52:23 pm »

or is it telling that zone only those specific files with in that size range can go there.
Yes.

Edit: The trailing or Size(0, 100MB) will select every file that is smaller than 100MB, no matter what you have selected or excluded earlier in that FileSelect! You probably closed the parenthesis to early.

Let's take a look at the script:
Code:
The center of harddrives are fastest; the outer is slowest.
No, it's the other way around. The outer part of the disk platters is the fastest part.

Code:
Slowdown(75)
ProcessPriority(AboveNormal)
You don't have to specify this for every FileSelect. Once declared, the setting is valid for the whole script.

Code:
It will  sort every common file type, its useage ammount ...
SortByLastAccess(Descending)
Note that the Last Access time stamp is not an evidence on how often a file is used. For example, a virus scanner can give all files a recent Last Access time stamp. The files in the layout.ini (ImportListFromBootOptimize() reads from this file) are already sorted in the order in which they are actually accessed, just use SortByImportSequence(Ascending).

Prefetch, which creates the layout.ini, is a bit tricky. You'll likely find several files in this zone you actually want to have at the very end, so you might want to exclude some of these files from this zone.

Code:
SortByLastAccess(Descending)
    Defragment(fast)
After the files have been sorted, they are already defragmented, so the Defragment action does nothing.

Code:
AddGap(ZoneEnd + VolumeFree * 0.005)
The file action to create a gap of a fixed size of 2% of the free space on the volume is:
Code:
AddGap(ZoneEnd + VolumeFree * 0.02)

Code:
/*Other MTF*/
SelectNtfsSystemFiles already selects these files. Also note that simply having a Defragment actions does not put this files to where you want them to be. You have to use an additional FastFill.

Code:
  FileSelect
    DirectoryPath("C:\Program Files\ESET")
    and DirectoryPath("C:\Program Files\symantec")
    and DirectoryPath("C:\Program Files\Norton AntiVirus")
    and DirectoryPath("C:\Program Files\Kaspersky Lab")
    and FullPath("C:\Program Files\Alwil Software\Avast5","*")
    ...
To select multiple files, you have to connect the statements with or. Note that DirectoryPath selects files faster than FullPath(...,"*") and should be used instead.

Code:
    and FullPath("C:\Program Files","EVGA Precision")
Will select a file named "EVGA Precision" somewhere in (a subdirectory of) "C:\Program Files". I doubt this was intended?

Code:
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere Pro CS3")
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere Pro CS4")
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere Pro CS5")
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere Elements 9")
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere Elements 10")
You can use the wildcard * to make your life easier
Code:
    and DirectoryPath("C:\Program Files\Adobe\Adobe Premiere*")

Code:
/*OTHER PROGRAM FILES with excluded most used programs*/
You've already selected (and placed) the "most used programs", so you don't have to exclude them in later zones. MyDefrag never moves a file that has been selected in a previous FileSelect.

Code:
DirectoryPath ("C:\Program Files\")
Will select nothing because of the trailing backslash. Remove it.

You repeat some of the above mentioned points multiple times, so you have to find and correct them all. Apart from that I don't see why there have to be so many zones. Like why having an extra zones for pdf files and not for doc?
« Last Edit: October 07, 2011, 06:55:34 pm by Darlis » Logged

Need help creating a script? Try MyDefrag Script Creator.
computerguy
JkDefrag Supporter
***
Posts: 10


Chat with me live 247


View Profile WWW
« Reply #4 on: October 07, 2011, 07:15:47 pm »

Questions:
The trailing or Size(0, 100MB) will select every file that is smaller than 100MB, no matter what you have selected or excluded earlier in that FileSelect! You probably closed the parenthesis to early?

Then how do I specify a size limit for folders and files in that zone?

 
Code:
FileSelect   
      Size(0,100MB)
    & (DirectoryPath("C:\Program Files\symantec")
    or DirectoryPath("C:\Program Files\Norton AntiVirus")
    or DirectoryPath("C:\Program Files\Kaspersky Lab"))
  FileActions
    SortByLastAccess(Ascending)
    AddGap(ZoneEnd + VolumeSize * 0.01)
 FileEnd

Wouldn't that select files with in that size limit? If not please post how to.

And what does:
("C:\Program Files\Kaspersky Lab")
vs
("C:\Program Files\Kaspersky Lab*")
mean exactly?
Logged

Check my website @ http://www.computersolutions.spruz.com. IM me live 247 http://webmessenger.yahoo.com/?im=zachreynolds5. I am a technology enthusiast. I boost computers by 70% on average.
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #5 on: October 07, 2011, 07:32:20 pm »

Wouldn't that select files with in that size limit? If not please post how to.
It selects all files in the specified directories that are smaller than 100MB, yes. You just made an error by closing the parenthesis to early
Quote
        ...
        or DirectoryPath("C:\Music")) <-- this ...
        or Size(0, 100MB) <-- ... needs to go here
The last Size(0, 100MB) is also redundant (if you place the parenthesis right) because you already select files larger than 100MB, so there is no need to exclude the smaller files.

And what does:
("C:\Program Files\Kaspersky Lab")
vs
("C:\Program Files\Kaspersky Lab*")
mean exactly?
The first one selects all files within "C:\Program Files\Kaspersky Lab",
the second one selects all files within "C:\Program Files\Kaspersky Lab" and additionally all files in the directories that start with "C:\Program Files\Kaspersky Lab", for example "C:\Program Files\Kaspersky Labs"
Logged

Need help creating a script? Try MyDefrag Script Creator.
computerguy
JkDefrag Supporter
***
Posts: 10


Chat with me live 247


View Profile WWW
« Reply #6 on: October 07, 2011, 08:13:55 pm »

This is my most recent version of my script. I would deeply appreciate it if you download it, review it and let me know if you spot any flaws. If possible, rewrite the flaws with your own corrections and reupload it in a reply. I have not slept for quite some time and any help is helpful to get me to my deadline faster.  Smiley
Download my BETA script

* Professional BETA.MyD (44.5 KB - downloaded 35 times.)
Logged

Check my website @ http://www.computersolutions.spruz.com. IM me live 247 http://webmessenger.yahoo.com/?im=zachreynolds5. I am a technology enthusiast. I boost computers by 70% on average.
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #7 on: October 07, 2011, 08:49:50 pm »

I've corrected the script a bit, it should work know you would expect. Some of the points I've written above still apply though.
Btw. you don't always have to write me pm's.

* Professional BETA.MyD (26.94 KB - downloaded 32 times.)
Logged

Need help creating a script? Try MyDefrag Script Creator.
computerguy
JkDefrag Supporter
***
Posts: 10


Chat with me live 247


View Profile WWW
« Reply #8 on: October 07, 2011, 09:43:37 pm »

Thank you very much. I really appreciate it. I will take a look at it.  Grin
Logged

Check my website @ http://www.computersolutions.spruz.com. IM me live 247 http://webmessenger.yahoo.com/?im=zachreynolds5. I am a technology enthusiast. I boost computers by 70% on average.
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!