integration of unix-like sync command

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
tdklaus
Junior Member
Junior Member
Posts: 41
Joined: 2003-02-14, 11:07 UTC

integration of unix-like sync command

Post by *tdklaus »

Hi all,
it's tricky to find out if this has been discussed before, because of the many "false" hits concerning directory synchronization.

What I am looking for is entirely different: to integrate the unix-like "sync" command (flush file system write buffers). The exe itself is available here:
http://technet.microsoft.com/en-en/sysinternals/bb897438.aspx

Has anybody alreeady integrated this, esp. with a few appropropriate button designs for the different possible actions? I guess these two would cover 95% my needs, and save lots of mouseclicks for safely ejecting a USB stick.
sync "active" drive
sync "active" drive and eject

thx for tips...
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

How do you want to integrate that tool? Just add it onto buttonbar, assign a hotkey or alias and call when you need it...

If you're creating buttonbar button or usercommand, there is no way to pass drive letter, but you can create batch file that will extract drive letter from passed path. So, use theese commands to pass active and passive panel's path:

Code: Select all

Command=Sync.bat
Parameters=%P

Code: Select all

Command=Sync.bat
Parameters=%T
And your batch should be the following:

Code: Select all

@start "%~dp0\Sync.exe" %~d1
(type full path to BAT in commands and place BAT near the EXE)
tdklaus
Junior Member
Junior Member
Posts: 41
Joined: 2003-02-14, 11:07 UTC

Post by *tdklaus »

For now, I have put in default.bar:

Code: Select all

button29=C:\Program Files (x86)\totalcmd\TOTALCMD.EXE,37
cmd29=C:\Windows\system32\sync.exe
param29=-r
path29=C:\Windows\system32\
menu29=SyncRemovableDrives
But coming to think of it, this would probably best be placed in the (right-click) context menu of the Drive buttons. I understand this is a Windows functionality, not TC, correct?
Post Reply