Topic: Flush (for flushing cached data to disk)  (Read 11393 times)

Flush (for flushing cached data to disk)
« on: October 17, 2010, 07:31:17 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Flush is a free and open source Windows application for flushing cached data to disk.

Download Flush (v.2.5):    * flush.rar (690.21 kB - downloaded 624 times.)

WinBuilder script is included with Gena.


Usage: flush.exe [-flush] [DRIVE] [-FIXED] [-REMOVABLE] [-RAMDISK] [-USB] [-SD] [-MMC] [-FDC] [-CURRENT] [-FORCE] [-REMAIN] [-ABOUT]

Examples:

   for current drive (and all disk's drives): flush.exe
   for all drives except FDC and CDROM      : flush.exe -flush
   for specified drives                     : flush.exe -flush C: D:
   for all fixed drives                     : flush.exe -flush -fixed
   for all removable drives                 : flush.exe -flush -removable
   for all ramdisk drives                   : flush.exe -flush -ramdisk
   for all USB drives                       : flush.exe -flush -usb
   for all SD drives                        : flush.exe -flush -sd
   for all MMC drives                       : flush.exe -flush -mmc
   for all FDC (floppy disc cont. drives)   : flush.exe -flush -fdc
   for current drive only                   : flush.exe -flush -current
   for specified drives by direct call      : flush.exe -flush -force C: D:
   for information display only             : flush.exe -about


Regards,
Galapo.
« Last Edit: September 12, 2012, 12:18:16 AM by Galapo, Reason: Updated attachment and commandline codes »

Re: Flush (for flushing cached data to disk)
« Reply #1 on: August 13, 2011, 09:43:43 PM »

maanu

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Aug 2011
  • Posts: 63
well , it is little bit hard for me to understand the purpose of this tool ? does it help with systems with low ram or something ? like swap file?

sorry if i am missing something here,

Regards,
Maanu from Pakistan

Re: Flush (for flushing cached data to disk)
« Reply #2 on: August 13, 2011, 10:42:22 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi maanu,

Sometimes people have write caching enabled on their harddisk and/or other removable media. Shutting down the system or pulling out a usb disk can leave cached data not written to the disk. This program flushes the file cache so that any cached data is written to the disk.

Hope this helps.

Regards,
Galapo.

Re: Flush (for flushing cached data to disk)
« Reply #3 on: August 13, 2011, 11:17:09 PM »

maanu

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Aug 2011
  • Posts: 63
ahhh . got it now . thanks for clearing out  :thumbsup:

Re: Flush (for flushing cached data to disk)
« Reply #4 on: August 13, 2011, 11:18:35 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
No problem. :smile:

Re: Flush (for flushing cached data to disk)
« Reply #5 on: August 28, 2012, 04:57:55 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Updated first post with latest version of Flush.

Homepage of Flush has now changed from galapo.boot-land.net/flush to tools.cwcodes.net/flush. :smile:

Regards,
Galapo.

Re: Flush (for flushing cached data to disk)
« Reply #6 on: August 28, 2012, 08:35:25 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
 :grin:
haha, still things forgotten, I believe the reason behind, we had done so much great amunt of work (quality+quantity) it is normal....


a mini request,

what about having -current switch

ex:

flush.exe -flush -current

which flushes the disk of flush.exe

annnd
an idea, making this as default
what i mean, double clickin on flush.exe, gives parameter list and than flushes current disk.
aside, also it will be nice to have -about inly to give info (author, info, web, forum topic, parameter info...)

idea behind: making flush.exe easly (since current drive would naturally be a working ---->not empty/fake fdc or cars reader) work (operational) out of box for new bies
ps: I already do same with a bach ;)

shorty (summary):
flush.exe -flush -current
flush.exe -flush -current (default behavior)
flush.exe -flush -about


 :smile:

Re: Flush (for flushing cached data to disk)
« Reply #7 on: August 28, 2012, 09:38:24 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Good suggestions! :thumbsup:

I can impelement those. What about when double-clicking it doesn't automatically flush the current drive but rather I modify the the message from "Press [ENTER] to exit" to something like "Press [ENTER] to exit or Press [C] to flush current drive"? What do you think?

Thanks,
Galapo.

Re: Flush (for flushing cached data to disk)
« Reply #8 on: August 28, 2012, 07:13:23 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Well, Than it won't be running out of box, which is the main purpose ;)
Other than that, one can easly create a batch, no need press C.....

Yep I understand your hesitation, and way, since it is also my way on %99.9 things,
but on this case, flush ing do not take any time (1 second) and having it operational out of box is very confortable,
try it on your ufd usages, you will see the fun of not using batch (but only the exe there)

a question is:
Since you know how codes work, maybe you know:
imagine I have 2 drive letters, C: D:, for one harddisk,
when C: flushed, does it mean all harddisk (hence its attached letters ) flushed ?

answer either yes or no,

having all drive of executable flushed when doubleclicked is the main goal on this case  :wink:

ps:
yep I know, normall ufd usage around (windowses) results with 1 drive letter, so not an urgent-critical request, besides would be useful for usd disks (I do not yet travel with usb disks ;))

 :cheers:



ps2:
The thing in my mind is something like following (I did not test if it fits default cmd window... only to give you idea, copy paste to notepad first)


Code: [Select]
Flush v.2.3  -  for flushing cached data to disk
  Usage: flush.exe -flush [DRIVE] [-FIXED] [-REMOVABLE] [-RAMDISK] [-USB] [-SD]
[-MMC] [-FDC] [-FORCE] [-REMAIN]
   Examples:
    for all drives except FDC and CDROM     : flush.exe -flush
    for specified drives                    : flush.exe -flush C: D:
    for all fixed drives                    : flush.exe -flush -fixed
    for all removable drives                : flush.exe -flush -removable
    for all ramdisk drives                  : flush.exe -flush -ramdisk
    for all USB drives                      : flush.exe -flush -usb
    for all SD drives                       : flush.exe -flush -sd
    for all MMC drives                      : flush.exe -flush -mmc
    for all FDC (floppy disc cont. drives)  : flush.exe -flush -fdc

    for specified drives by direct call     : flush.exe -flush -Force C: D:
    for current drive by  (default)         : flush.exe -flush -current
    to only display information             : flush.exe -flush -about
Successfully flushed: C:
Press [ENTER] to exit

ps:
if more letters attached to drive, a message like that (theorically testing with flush.exe at C:)
Successfully flushed: C: D: E:

 :cheers:

Re: Flush (for flushing cached data to disk)
« Reply #9 on: August 28, 2012, 07:27:00 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Shortly, What I want try to want to achive is:

To easly tell a new bie:

Put Galapo's flush.exe to your ufd or usb-disk
before plug-out, doubleclick flush.exe, see "Successfully flushed" message at the end of the screen,
than close the screen,
and plug out
Fast, easy  :thumbsup:

 :cheers:

Re: Flush (for flushing cached data to disk)
« Reply #10 on: August 29, 2012, 06:09:59 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
a question is:
Since you know how codes work, maybe you know:
imagine I have 2 drive letters, C: D:, for one harddisk,
when C: flushed, does it mean all harddisk (hence its attached letters ) flushed ?

answer either yes or no

No. Data held in cache is by drive letter, not harddisk.

I may be able to code something so that other drive letters on a harddrive are enumerated and flushed. That's what you're after, right?

If you thought it best that default behaviour flushed current drive letter and any further fixed drives, then I wouldn't need to code for the above situation and it would be straight forward to add. What do you think?

Regards,
Galapo.
« Last Edit: August 29, 2012, 06:13:12 AM by Galapo »

Re: Flush (for flushing cached data to disk)
« Reply #11 on: August 29, 2012, 10:10:32 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I found a function here that I should be able to use to do what you suggest: http://www.autoitscript.com/forum/topic/91598-get-disk-number-from-drive-letter/#entry659721

Regards,
Galapo.

Re: Flush (for flushing cached data to disk)
« Reply #12 on: August 29, 2012, 12:36:30 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
No. Data held in cache is by drive letter, not harddisk.
interesting  :thumbsup:

I may be able to code something so that other drive letters on a harddrive are enumerated and flushed. That's what you're after, right?
:thumbsup:


I found a function here that I should be able to use to do what you suggest: http://www.autoitscript.com/forum/topic/91598-get-disk-number-from-drive-letter/#entry659721
:thumbsup::thumbsup::thumbsup:


Yep, take id of "The hd", get other "letters of that HD", and flush them all, (and than unplug device)



***
Besides as I wrote, this feature would be useful for usb-hd, on ufd everything ok with single driveletter....

What I mean, you can implement flushing current drive of flush.exe easly with v2.5 --> Naturally most usable on UFD plug off

Than much later (when you have time) improve with the au3 codes/way --> Than It would be useful on USB-Disk plug off (ps: I do not know, never experienced other usb devices, cardreaders, etc...., besides in all way this last improvment would be the last point)

 :cheers:

Re: Flush (for flushing cached data to disk)
« Reply #13 on: September 12, 2012, 12:19:34 AM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
You suggestion has now been implemented. Updated at first post, at tools.CWCodes.net, and on Gena server.

Regards,
Galapo.

 

Powered by EzPortal