Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 26, 2013, 07:35:50 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: Sort not Sorting.  (Read 1876 times)
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« on: July 16, 2009, 05:56:24 pm »

Hi All.

I have a script that I'll include there.    What I'm trying to acomplish is have the C:\SavedZeros\zero###.tmp files pushed to the back of the disk and sorted Zero001.tmp being right at the end. Then Zero002.tmp, Zero003.tmp etc...  I would like it to fill all spaces (split if it has to, to get around unmovable files) and yes, Rewrite the entire thing if even on byte size difference means it has to.

I thought I had it using b12 and this script but it doesn't seem work.  The C:\SavedZeros\* directory gets move to the end of the disk but not only is it not sorted but it's not even defragged.  I don't see any files in the way and the drive is 16% free with a 10gig empty area between the last and second last zones.  Clearly big enough do defrag these 1 gig files (there are 60 of them)

What to do? What to do?  Smiley

Here is the script.

Title('SunBlade Optimize')
Description('
just defrag
')

RunScript('Settings')

VolumeSelect
  CommandlineVolumes()
  and Removable(no)
  and Writable(yes)
  and Mounted(yes)
VolumeActions

  FileSelect
    FileName("$mft")
  FileActions
    SortByName(Ascending)
    AddGap(PercentageOfVolume(1))
  FileEnd

  FileSelect
    Directory(yes)
  FileActions
    Defragment()
    FastFill()
    AddGap(UntilPercentageOfVolumeMultiple(1))
  FileEnd

  FileSelect
    ImportListFromBootOptimize()
  FileActions
    Defragment()
    FastFill()
    AddGap(UntilPercentageOfVolumeMultiple(1))
  FileEnd

  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("ie7updates")
      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("*.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")
      or FullPath("C:\SavedZeros\*")
      )
  FileActions
    Defragment()
    FastFill()
    AddGap(UntilPercentageOfVolumeMultiple(1))
  FileEnd

  FileSelect
    all
    and not (FullPath("C:\SavedZeros\*"))
  FileActions
    Defragment()
    FastFill()
    AddGap(PercentageOfVolume(100) DoNotVacate)
  FileEnd

  FileSelect
    FullPath("C:\SavedZeros\*")
  FileActions
    SortByName(Descending)
//    FastFill()
  FileEnd

//  RunScript('WriteLogfile')

VolumeEnd
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: July 16, 2009, 06:43:48 pm »

The SortByName action needs some free space above the zone to move files out of the way. But your AddGap leaves no space at all.

You could try an AddGap that leaves a bit more room, for example "MakeGap(UntilPercentageOfVolume(80))". It's not very elegant, I know. I have it on the wishlist to add something to the program so that placing files at the end of the disk is better, easier, more elegant. I haven't decided exactly what, but it's a big change. Sometime in the future...
Logged
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #2 on: July 16, 2009, 06:48:04 pm »

Hummm. Just to confirm I understand you.

That would mean that the zero???.tmp files would no longer be at the end of the disk because there needs to be a gap there?

Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: July 16, 2009, 07:32:38 pm »

That would mean that the zero???.tmp files would no longer be at the end of the disk because there needs to be a gap there?
Yes.
Logged
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #4 on: July 16, 2009, 07:36:40 pm »

Ok, I did this to the last two zones.


  FileSelect
    all
    and not (FullPath("C:\SavedZeros\*"))
  FileActions
    Defragment()
    FastFill()
    AddGap(PercentageOfVolume(100) DoNotVacate)
  FileEnd

  FileSelect
    FullPath("C:\SavedZeros\*")
  FileActions
    SortByName(Descending)
//    FastFill()
    AddGap(UntilMegabytes(1024))
  FileEnd



It didn't work.  could the AddGap(PercentageOfVolume(100) DoNotVacate) be interfearing some how?

It really looked like it did nothing on zone 6 (the last one)


I found the log file it said this

13:33:35   Zone 5 of 6
13:33:35     Looking for: C:\SavedZeros\*
13:33:35     Defragment
13:33:35     FastFill
13:33:36     Vacating free area
13:33:36   Zone 6 of 6
13:33:36     Looking for: C:\SavedZeros\*
13:33:36     SortBy
13:33:37             Insufficient free space on disk for moving: C:\SavedZeros\ZERO0070.TMP
13:33:37     Vacating free area
13:33:38   Zone 6 of 6
13:33:38 Finished with disk C:
« Last Edit: July 16, 2009, 07:39:21 pm by isgdre » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #5 on: July 16, 2009, 07:40:49 pm »

could the AddGap(PercentageOfVolume(100) DoNotVacate) be interfearing some how?
Yes dude, it is interfering somehow. Your script is making a gap with a size of 100% of the disk, just before you want to place your files. Duh....
Logged
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #6 on: July 16, 2009, 07:45:47 pm »

Duh....
I was told (by you I think) that, thats the 'trick' to get it to back fill from the end of the disk. 
If that trick dosen't work (ie it will not allow the sorting to work) do you have a different one?

Or are we waiting for 4.x?
Logged
gemisigo
JkDefrag Hero
*****
Posts: 110


View Profile
« Reply #7 on: July 16, 2009, 08:47:49 pm »

This trick moves the files to the end of the disk, it does not defragment them there. It isn't told anywhere they will be defragmented.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #8 on: July 16, 2009, 09:59:46 pm »

If that trick dosen't work
I think you are missing the point. Let me try again, with two arrows in your code to point at what is wrong. Delete the first addgap and move the second addgap in it's place.
Code:
  FileSelect
    all
    and not (FullPath("C:\SavedZeros\*"))
  FileActions
    Defragment()
    FastFill()
    AddGap(PercentageOfVolume(100) DoNotVacate)           <<<----- Too big !!!!!
  FileEnd

  FileSelect
    FullPath("C:\SavedZeros\*")
  FileActions
    SortByName(Descending)
//    FastFill()
    AddGap(UntilMegabytes(1024))                          <<<----- Too late !!!!!
  FileEnd
Logged
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #9 on: July 17, 2009, 01:02:12 am »

I'll try that but then I'm unsure how the files will be pushed to the end of the disk.  is it just because it's the last zone?
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #10 on: July 17, 2009, 05:05:28 am »

The files will not be at the very end of the disk, there will be a gap after the files. By the way, your "AddGap(UntilMegabytes(1024))" is probably not what you want, I suggest "MakeGap(UntilPercentageOfVolume(80))". You will have to adjust the number so there is enough space for your files plus some extra room for moving files around.
Logged
isgdre
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #11 on: July 17, 2009, 08:13:36 pm »

Ok, Well, I really really want the files to be at the end of the disk.  It would be great if they were sorted so I know which ones would be the best to move around when I needed to. 

I guess I'll keep things the way they are and take a look at your new versions when they come down the pipe.

Thanks anyway.
Logged
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!