Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 19, 2013, 11:15:28 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: How can i analyze with result showing fragmented files in percent?  (Read 786 times)
WDFreak
JkDefrag Supporter
***
Posts: 17


View Profile
« on: April 10, 2012, 06:15:47 pm »

Instead of showing number of fragmented files?

Thanks!
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #1 on: April 10, 2012, 06:41:32 pm »

Take a look at all the variables MyDefrag provides. Just edit your Settings.MyD file and add or replace the variables you like.
Logged

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


View Profile
« Reply #2 on: April 10, 2012, 09:14:57 pm »

Take a look at all the variables MyDefrag provides. Just edit your Settings.MyD file and add or replace the variables you like.

You mean the AnalyzeOnly script? Or could i make a copy of it and just rename it AnalyzeOnlyCustum script?
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #3 on: April 10, 2012, 09:40:48 pm »

You can use the variables in any script you like. You only have to make sure that they are used within an VolumeSelect block, otherwise they won't contain any useful data.

It's the Settings.MyD file where the "messages" are set up with the information you see in the log files. Other scripts like the Analyze Only script just write these messages to a file. It's been made this way so that any translatable text is in one file.
Logged

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


View Profile
« Reply #4 on: April 10, 2012, 10:40:22 pm »

You can use the variables in any script you like. You only have to make sure that they are used within an VolumeSelect block, otherwise they won't contain any useful data.

It's the Settings.MyD file where the "messages" are set up with the information you see in the log files. Other scripts like the Analyze Only script just write these messages to a file. It's been made this way so that any translatable text is in one file.

I don't follow you, do you mean i should change settings in the Settings.MyD? I haven't changed anything in it since i installed MyDefrag. Where exactly should i put the variable that makes it show in percent instead?

Thanks!
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #5 on: April 11, 2012, 06:02:03 am »

This is an example of a modified Analyze Only script:
Code:
Title('Analyze only2')
Description("Analyze only description")            // See the "Settings.MyD" file.

WhenFinished(exit)
RememberUnmovables(no)

WriteLogfile("MyDefrag.log","LogHeader")

VolumeSelect
  CommandlineVolumes()
VolumeActions
  //AppendLogfile("MyDefrag.log","LogAnalyzeOnly")
 
  AppendLogFile("MyDefrag.log","###############################################################################
Analyzing volume:   !MountPoint!
###############################################################################

Total disk space:   !VolumeSize! bytes (!VolumeSizeG! GigaBytes)
Volume type:        !VolumeType!

Unfragmented items: !FILES202N! bytes !FILES200N! items
Fragmented items:   !FILES212N! bytes !FILES210N! items
                    (!FILES202P! %)     (!FILES210P! %)
Gaps:               !GAP10N! bytes !GAP00N! gaps
Average gap:        !GAP13N! bytes
Median gap:         !GAP14N! bytes
Biggest gap:        !GAP15N! bytes
Average end-begin distance: !AverageBeginEndDistance! clusters


These items are fragmented:
Fragments   Bytes             Clusters     Name
----------- ----------------- -----------  ------------------------
!FragmentedList!
----------- ----------------- -----------  ------------------------
!FragmentedTotalFragments! !FragmentedTotalBytes! !FragmentedTotalClusters!  Total


The 25 largest items on disk:
Fragments   Bytes             Clusters     Name
----------- ----------------- -----------  ------------------------
!LargestItemsList!
----------- ----------------- -----------  ------------------------
!LargestItemsTotalFragments! !LargestItemsTotalBytes! !LargestItemsTotalClusters!  Total

")
 
  Pause()
VolumeEnd

AppendLogfile("MyDefrag.log","LogFooter")

I've just copied the text the Analyze Only script usually outputs from the Settings.MyD file and added two variables.
Logged

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


View Profile
« Reply #6 on: April 14, 2012, 07:10:43 am »

This is an example of a modified Analyze Only script:
Code:
Title('Analyze only2')
Description("Analyze only description")            // See the "Settings.MyD" file.

WhenFinished(exit)
RememberUnmovables(no)

WriteLogfile("MyDefrag.log","LogHeader")

VolumeSelect
  CommandlineVolumes()
VolumeActions
  //AppendLogfile("MyDefrag.log","LogAnalyzeOnly")
 
  AppendLogFile("MyDefrag.log","###############################################################################
Analyzing volume:   !MountPoint!
###############################################################################

Total disk space:   !VolumeSize! bytes (!VolumeSizeG! GigaBytes)
Volume type:        !VolumeType!

Unfragmented items: !FILES202N! bytes !FILES200N! items
Fragmented items:   !FILES212N! bytes !FILES210N! items
                    (!FILES202P! %)     (!FILES210P! %)
Gaps:               !GAP10N! bytes !GAP00N! gaps
Average gap:        !GAP13N! bytes
Median gap:         !GAP14N! bytes
Biggest gap:        !GAP15N! bytes
Average end-begin distance: !AverageBeginEndDistance! clusters


These items are fragmented:
Fragments   Bytes             Clusters     Name
----------- ----------------- -----------  ------------------------
!FragmentedList!
----------- ----------------- -----------  ------------------------
!FragmentedTotalFragments! !FragmentedTotalBytes! !FragmentedTotalClusters!  Total


The 25 largest items on disk:
Fragments   Bytes             Clusters     Name
----------- ----------------- -----------  ------------------------
!LargestItemsList!
----------- ----------------- -----------  ------------------------
!LargestItemsTotalFragments! !LargestItemsTotalBytes! !LargestItemsTotalClusters!  Total

")
 
  Pause()
VolumeEnd

AppendLogfile("MyDefrag.log","LogFooter")

I've just copied the text the Analyze Only script usually outputs from the Settings.MyD file and added two variables.

Thanks very much! But seems it doesn't work for me. Should i put (!FILES202P! %)     (!FILES210P! %) in the Settings.myd file?
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #7 on: April 14, 2012, 03:55:58 pm »

No, you don't have to change the Setting.MyD because I copied the content for the log file into this new script.

What exactly does not work? Do you get the log file at all? Are the variables not replaced (you still see "!FILES202P!" in the log file)? Are the values not correct?
Logged

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


View Profile
« Reply #8 on: April 17, 2012, 02:14:19 am »

No, you don't have to change the Setting.MyD because I copied the content for the log file into this new script.

What exactly does not work? Do you get the log file at all? Are the variables not replaced (you still see "!FILES202P!" in the log file)? Are the values not correct?

Ok i saved that into textfile and saved it as AnalyzeOnly2.MyD. Where should i put it? When i press it it starts analyzing C: for some reason. I want to choose which drive to analyze.

Thanks!

edit: I put it with the rest of the scripts and now it works. The output file should be in the main catalogue of MyDefrag? The output file shows the fragmented files in percent with the default AnalyzeOnly script, wasn't it unessesary to add those commandlines in the one you gave me?
« Last Edit: April 17, 2012, 02:20:50 am by WDFreak » Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #9 on: April 17, 2012, 06:18:38 am »

The default scripts do not output any percentage values. The script I posted above also uses the "MyDefrag.log" log file, maybe that's where you get confused which log file belongs to which script. Replace any occurrence of "MyDefrag.log" with "MyDefrag2.log" in the modified script to be sure you have the right log.
Logged

Need help creating a script? Try MyDefrag Script Creator.
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!