Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
April 23, 2014, 09:18:30 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: how can i exlude 1 or more files or folders?  (Read 3327 times)
drugo
JkDefrag Hero
*****
Posts: 112


View Profile
« on: March 16, 2011, 08:44:01 am »

Hi

for example about the script consolidate free space

how can i add an exlusion about 1 or more files or folders?

i mean i would like my defrag will defrag all files outside a list of files or folder

thanks
Logged
drugo
JkDefrag Hero
*****
Posts: 112


View Profile
« Reply #1 on: March 16, 2011, 12:01:52 pm »

i mean defrag all files outside hardpage.sys and mymobie.avi or a folder like C:\program\antivirus\*
Logged
WHRoeder
JkDefrag Hero
*****
Posts: 179


View Profile
« Reply #2 on: March 16, 2011, 05:10:31 pm »

how can i add an exlusion about 1 or more files or folders?
Look at the daily, weekly or monthly scripts. They all create multiple zones and exclude all files that don't belong to that zone.
Logged
drugo
JkDefrag Hero
*****
Posts: 112


View Profile
« Reply #3 on: March 16, 2011, 05:26:12 pm »

how can i add an exlusion about 1 or more files or folders?
Look at the daily, weekly or monthly scripts. They all create multiple zones and exclude all files that don't belong to that zone.
there is nothing
i mean inside the script to exlude a file or folder

Code:
# MyDefrag v4.0 default script: Data Disk Daily
#
# This script is part of the standard MyDefrag distribution.

Title('Data Disk Monthly')
Description("Data Disk Monthly description")   // See the "Settings.MyD" file.



/* Write the header to the logfile. See the "Settings.MyD" file for the
   definition of the "LogHeader" string. */
WriteLogfile("MyDefrag.log","LogHeader")

/* 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: Directories. */
  FileSelect
    Directory(yes)
  FileActions
    SortByName(Ascending)
  FileEnd

  MakeGap(RoundUp(ZoneBegin,VolumeSize * 0.001))

  /* Zone 3: all other files. */
  FileSelect
    all
  FileActions
    SortByName(Ascending)
  FileEnd

  /* Write the "after" statistics to the logfile. See the "Settings.MyD" file
     for the definition of the "LogAfter" string. */
  AppendLogfile("MyDefrag.log","LogAfter")

VolumeEnd

/* Write the footer to the logfile. See the "Settings.MyD" file for the
   definition of the "LogFooter" string. */
AppendLogfile("MyDefrag.log","LogFooter")


Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #4 on: March 16, 2011, 06:45:25 pm »

Add the following code before the VolumeSelect in the Consolidate script:
Code:
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

This way these files won't be touched by MyDefrag when running the Conslidate script.
Logged

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


View Profile
« Reply #5 on: March 16, 2011, 08:40:59 pm »

Add the following code before the VolumeSelect in the Consolidate script:
Code:
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

This way these files won't be touched by MyDefrag when running the Conslidate script.

thanks Darlis
may i ask with is the position of the partition to move the mft and folder?

thank a lot
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #6 on: March 16, 2011, 09:01:07 pm »

may i ask with is the position of the partition to move the mft and folder?

Sorry I don't understand. Could you rephrase that sentence?
Logged

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


View Profile
« Reply #7 on: March 17, 2011, 08:19:51 am »

Add the following code before the VolumeSelect in the Consolidate script:
Code:
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

This way these files won't be touched by MyDefrag when running the Conslidate script.
may i ask ?
do i do right?
does it work with another script like DataDiskMonthly.MyD or other script?

Quote
# MyDefrag v4.0 default script: Data Disk Daily
#
# This script is part of the standard MyDefrag distribution.

Title('Data Disk Monthly')
Description("Data Disk Monthly description")   // See the "Settings.MyD" file.



/* Write the header to the logfile. See the "Settings.MyD" file for the
   definition of the "LogHeader" string. */
WriteLogfile("MyDefrag.log","LogHeader")

/* Select and process the volumes one by one. */
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

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: Directories. */
  FileSelect
    Directory(yes)
  FileActions
    SortByName(Ascending)
  FileEnd

  MakeGap(RoundUp(ZoneBegin,VolumeSize * 0.001))

  /* Zone 3: all other files. */
  FileSelect
    all
  FileActions
    SortByName(Ascending)
  FileEnd

  /* Write the "after" statistics to the logfile. See the "Settings.MyD" file
     for the definition of the "LogAfter" string. */
  AppendLogfile("MyDefrag.log","LogAfter")

VolumeEnd

/* Write the footer to the logfile. See the "Settings.MyD" file for the
   definition of the "LogFooter" string. */
AppendLogfile("MyDefrag.log","LogFooter")

thanks you are always very kind
« Last Edit: March 17, 2011, 10:13:14 am by drugo » Logged
drugo
JkDefrag Hero
*****
Posts: 112


View Profile
« Reply #8 on: March 17, 2011, 08:23:01 am »

may i ask with is the position of the partition to move the mft and folder?

Sorry I don't understand. Could you rephrase that sentence?

you did a script to defrag and put the folders close to the mft zone
when i run this script mydefrag put my mft and folder always in a different location of my partition
for example sometime in the beginning of the hard disk , sometime in the middle of the data

is there a better position to move mft+folders?

thanks
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #9 on: March 17, 2011, 06:42:41 pm »

does it work with another script like DataDiskMonthly.MyD or other script?
Yes, it works for all scripts. If you never want to move these files you can even put it in the Settings.MyD script.

when i run this script mydefrag put my mft and folder always in a different location of my partition
The Consolidate Free Space script treats the MFT and directories like any other files, since there are no zones like in the Data Disk scripts.

is there a better position to move mft+folders?
Somewhere near the beginning of the volume. Ideally where the most reads and writes occur. On a system disk, it would be near the boot/prefetch files. On a data disk you have to decide yourself.
Logged

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


View Profile
« Reply #10 on: March 19, 2011, 08:35:24 am »

Quote
Yes, it works for all scripts. If you never want to move these files you can even put it in the Settings.MyD script.

sorry where can i add the
Quote
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

i want for example exlude the pagefile.sys because i have in a different partition , and i setup w7 to delete it after shut down

thanks Darlis

Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #11 on: March 19, 2011, 03:56:36 pm »

You can place it anywhere in the Settings.MyD file. I think the best place is after the ExcludeVolumes block, just to have the similar statements close together.
(A part of) the settings file should then look like this:
Code:
# Do not show cdroms in the script chooser window:
ExcludeVolumes(CDRom(yes) or not(CommandlineVolumes()))

# Always exclude some files
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

Note that if you have another ExcludeFiles in a script, it will override the one in the settings file.
Logged

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


View Profile
« Reply #12 on: March 19, 2011, 04:21:35 pm »

You can place it anywhere in the Settings.MyD file. I think the best place is after the ExcludeVolumes block, just to have the similar statements close together.
(A part of) the settings file should then look like this:
Code:
# Do not show cdroms in the script chooser window:
ExcludeVolumes(CDRom(yes) or not(CommandlineVolumes()))

# Always exclude some files
ExcludeFiles( FileName("hardpage.sys")
  or FileName("mymobie.avi")
  or DirectoryPath("C:\program\antivirus") )

Note that if you have another ExcludeFiles in a script, it will override the one in the settings file.

thanks
for a file i can use FileName("hardpage.sys")
i can use FileName("hardp*.*") too , can't i?



« Last Edit: March 19, 2011, 04:24:52 pm by drugo » Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #13 on: March 19, 2011, 04:27:18 pm »

for a file i can use FileName("hardpage.sys")
i can use FileName("hardp*.*") too , can't i?
Yes.
Logged

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


View Profile
« Reply #14 on: July 22, 2011, 04:51:23 pm »

for a file i can use FileName("hardpage.sys")
i can use FileName("hardp*.*") too , can't i?
Yes.
may i exlude for example mft & folder ?
for mft & folders i use
Code:
/* 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


or boot prefetch files like
Code:
/* Zone 4: files used when booting, and a gap. */
  FileSelect
    ImportListFromBootOptimize()
    & not (
      FileName("*.avi")
      or FileName("*.mp3")
      or FileName("*.wmv")
    )
  FileActions
    Defragment(Fast)
    Defragment()
    FastFill(WithShuffling)
    AddGap(RoundUp(ZoneEnd,VolumeFree * 0.01))
  FileEnd


thanks
Logged
Pages: [1] 2
  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!