I mounted 2 volumes as a NTFS mountpoint, one is E:\ARCHIV_FOTOS and one is E:\ARCHIV_DATA. I added the following block in the OptimizeDaily Script before the VolumeSelect block.
ExcludeFiles(
DirectoryName("E:\ARCHIV_FOTOS\") and
DirectoryName("E:\ARCHIV_DATA\")
)
ExcludeVolumes(
Name("E:\ARCHIV_FOTOS\") and
Name("E:\ARCHIV_DATA\") and
Name("\\?\Volume{536d1a8a-bc31-11de-8353-806e6f6e6963}\") and
Name("\\?\Volume{536d1a89-bc31-11de-8353-806e6f6e6963}\")
)
So this is the whole script.
# MyDefrag v4.0 default script: Optimize Daily
#
# This script is part of the standard MyDefrag distribution.
Title('Optimize Daily')
Description("Optimize Daily description") // See the Setup.Myd file.
/* Automatically exit when the script has finished. This script is designed to
be run via the task scheduler, so it must exit automatically. */
WhenFinished(exit)
/* Write the header to the logfile. See the "Settings.MyD" file for the
definition of the "LogHeader" string. */
WriteLogfile("MyDefrag.log","LogHeader")
ExcludeFiles(
DirectoryName("E:\ARCHIV_FOTOS\") and
DirectoryName("E:\ARCHIV_DATA\")
)
ExcludeVolumes(
Name("E:\ARCHIV_FOTOS\") and
Name("E:\ARCHIV_DATA\") and
Name("\\?\Volume{536d1a8a-bc31-11de-8353-806e6f6e6963}\") and
Name("\\?\Volume{536d1a89-bc31-11de-8353-806e6f6e6963}\")
)
/* Select and process the volumes one by one. */
VolumeSelect
CommandlineVolumes()
and Removable(no)
and Writable(yes)
and Mounted(yes)
VolumeActions
/* Write the "before" statistics to the logfile. See the "Settings.MyD" file
for the definition of the "LogBefore" string. */
AppendLogfile("MyDefrag.log","LogBefore")
/* Reclaim the NTFS reserved area by moving non-system files to regular
diskspace. */
ReclaimNtfsReservedAreas()
/* Zone 1: NTFS system files (such as the $MFT) and a small gap. */
FileSelect
SelectNtfsSystemFiles(yes)
FileActions
PlaceNtfsSystemFiles(Ascending)
AddGap(UntilPercentageOfVolumeMultiple(0.01))
FileEnd
/* Zone 2: directories and a gap. */
FileSelect
Directory(yes)
FileActions
Defragment(Fast)
FastFill()
AddGap(UntilPercentageOfVolumeMultiple(1))
FileEnd
/* Zone 3: files used when booting, and a gap. */
FileSelect
ImportListFromBootOptimize()
FileActions
Defragment(Fast)
FastFill()
AddGap(UntilPercentageOfVolumeMultiple(1))
FileEnd
/* Zone 4: regular files and a gap. */
FileSelect
not(
Size(50000000,0)
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("*.7z")
or FileName("*.arj")
or FileName("*.avi")
or FileName("*.bak")
or FileName("*.bup")
or FileName("*.bz2")
or FileName("*.cab")
or FileName("*.chm")
or FileName("*.dvr-ms")
or FileName("*.gz")
or FileName("*.ifo")
or FileName("*.iso")
or FileName("*.log")
or FileName("*.lzh")
or FileName("*.mp3")
or FileName("*.msi")
or FileName("*.old")
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")
)
FileActions
Defragment(Fast)
FastFill()
AddGap(UntilPercentageOfVolumeMultiple(1))
FileEnd
/* Zone 5: spacehog files (less important files that take up a lot of space). */
FileSelect
all
FileActions
Defragment(Fast)
FastFill()
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
When I start it, both excluded volumes are processed even though they are excluded 2 times with ExcludeFiles and ExcludeVolumes. Anyone can explain it?