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

0 Members and 1 Guest are viewing this topic.

Flush (for flushing cached data to disk)
« on: October 16, 2010, 09:31:17 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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 531 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 11, 2012, 02:18:16 PM by Galapo, Reason: Updated attachment and commandline codes »

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

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, 12:42:22 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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, 01: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, 01:18:35 PM »

Galapo

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

Re: Flush (for flushing cached data to disk)
« Reply #5 on: August 27, 2012, 06:57:55 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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 27, 2012, 10:35:25 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7388
 :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 27, 2012, 11:38:24 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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, 09:13:23 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7388
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, 09:27:00 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7388
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 28, 2012, 08:09:59 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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 28, 2012, 08:13:12 PM by Galapo »

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

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
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, 02:36:30 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7388
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 11, 2012, 02:19:34 PM »

Galapo

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

Regards,
Galapo.

 

Powered by EzPortal