Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
June 19, 2013, 05:51:56 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: MoveUpFill() Function  (Read 842 times)
RandomClown
JkDefrag Supporter
***
Posts: 16


HoRC


View Profile WWW
« on: September 17, 2009, 08:43:55 am »

It would be nice to have a 1 line function for this.
The current "MoveToEndOfDisk.MyD" is a bit confusing, & doesnt work for me:
- Giganto gaps everywhere
- Frags everywhere [frags are ok, but they failed to move-to-end-of-disk]
- Script ends before performing the next volume select

Code:
VolumeSelect
Name("D:")  // Inactive drive for backing up program installers
VolumeActions
MakeGap(PercentageOfVolume(100))   /* Dirty trick to move all the files to the end of the disk. */
VolumeEnd

// This is where my script says "Finished"

VolumeSelect
Name("D:")
VolumeActions
FileSelect
FileName("*.exe")
FileActions
Title('Organizing Volume')
SortByName(Ascending)
Title('Filling')
MoveDownFill()
FileEnd
VolumeEnd



An actual function dedicated to moving up is better than a trick.

I hope this will be added.
I have to use RunScript to run the old JkDefrag -6 if I want to move files up.


Thanks for reading
« Last Edit: September 17, 2009, 08:46:31 am by RandomClown » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #1 on: September 17, 2009, 08:50:00 am »

Thanks for sharing your idea, I appreciate it. Making it easier to move files to the end of the disk has been asked before, and several suggestions have been offered. I still have to look at it and decide on the best way to do it.

p.s. Volumes are only processed once in a script. See the second bullit on the VolumeSelect page.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1725


View Profile WWW
« Reply #2 on: September 17, 2009, 10:35:54 am »

You can do this in one VolumeSelect:
Remove the first VolumeSelect and put the MakeGap(PercentageOfVolume(100)) statement after FileEnd of the second VolumeSelect.
This will move all *.exe-files down and everything else up.

Btw. the MoveDownFill() statement does nothing, because SortByName() already moved everything down without leaving gaps.
Logged

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


View Profile
« Reply #3 on: September 17, 2009, 03:51:23 pm »

I don't like MoveDownFill() command. If there's a single gap in the zone, it'll move the whole rest of the zone and if the gap isn't big enough it'll move each file twice - first to move it out of the way, second to move it to the place. I also have no idea what it would do if it runs into start of a fragmented file which doesn't fit into the gap available.
Notice that any new files will be placed out of order anyway and if the zone shifts up because previous zone grew, all files that are now below the zone start will get scattered too.

For the same reason I'd prefer FastFillUp() with optional WithShuffling parameter - it'll work the same way FastFill works, but backwards, i.e. it'd pack all files towards the end of the disk.

If there isn't any special reason for it, MoveDownFill() should IMO work as this:
- if the gap is big enough to contain file following the gap, move it there
- if it is not, move the following file behind all files in the zone and repeat the process (i.e. try to move down the file which is NOW following the bigger gap)

That way, the whole zone will still get moved, but most files will only get moved once and only few files will get out of their positions.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #4 on: September 18, 2009, 10:01:49 am »

MoveDownFill() should IMO work as this:
Thanks for sharing your idea, I appreciate it. I like the idea, and have put it on the wishlist for future implementation. It will indeed reduce the amount of data moved, making the program finish sooner.
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!