Topic: DIR-FDOUBLE - Helper tool for finding double files (1 of 7), Read 32 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Friday, March 12, 2004 04:12 AM


While tidying up my office these days I found hundreds of double files
(same and different versions) on my harddisk.

So I wrote a VEDIT macro to help me handling those files.

It lists all files with double filenames (Data shown: date, time, size
and path) and provides several commands via key assignment to work
with the files:
It doesn't DO anything with that files directly. You can open and
edit them of course.
Perhaps I'll implement a function "delete marked files" later.


F12 - open file at cursor line
- close the file again

Shft-F12 - open files with same name in and around cursor line
- closes all same named files again

Ctrl-F12 compare files with same name in and around cursor line
(And marks them with A..J to show diffs)

Ctrl-F10 - toggle DELETE flag of file in current cursor line
- toggle DELETE flag of current file in list
Ctrl-Shft-F10 ... and advance one line

Alt-F10 delete non double filenames (req. by-name sorted list)

F11 sort list by filename
Shft-F11 sort list by path
Ctrl-F11 sort list by DELETE flag (at EoF)
Alt-F11 sort list by size



Notes:
- Only for WINNT and above yet (due to different DIR formats).
I'll add Win9x support later.

- Only tested with German Windows yet.
But should work with English Windows too.
If not: Please send me a short listing of "DIR /s"
so that I'm able to fix that
(I don't have access to an English Windows.)



Christian


12.03.2004: Attachment removed. There are too many new versions these days...
The Current one is available here
http://ziemski.privat.t-online.de/vedit/macros/dir-fdouble.vdm

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (2 of 7), Read 25 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Thursday, March 11, 2004 03:25 PM

At 03:06 PM 3/11/2004, you wrote:
>So I wrote a VEDIT macro to help me handling those files.
>...
>The macro is only for WINNT and above yet (due to DIR format).
>And is only tested with German Windows yet.

As Christian knows, we are adding some new commands right now that should simplify such macros and make them work in all versions of Windows.

File_Size("path\file.ext") - Return file size of specified file.

File_Stamp(r,"path\file.ext") - Return file's date and time as a string into
T-reg 'r'.

File_Date("path\file.ext") - Return file's date as a Julian date number.

File_Time("path\file.ext") - Return file's time as number of milliseconds
since midnight.

These will be available in VEDIT 6.12, hopefully in a few more days.

Ted.

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (3 of 7), Read 22 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Friday, March 12, 2004 03:43 PM

On Thu, 11 Mar 2004 15:25:00 -0500, Ted wrote:

>... we are adding some new commands right now that should
>simplify such macros ...
>
>File_Stamp(r,"path\file.ext") - Return file's date and time as a string into
> T-reg 'r'.

Do you plan to make File_Stamp() as configurable as the new date()?
That would be nice.


For my above macro I think using the Windows DIR command directly,
inclusive stamp and size, is faster if I have to work with *many*
files. Otherwise I would have to loop over all files in the macro to
get those data.

Optimal I can imagine an extended DIR in VEDIT which lists the files
with path, stamp and size in a standard way, independent of the
Windows version.
e.g.:
22.12.2003 08:56 614.328 C:\infos\wintv_dvb-s.pdf


But anyway: your new commands will be really of great help!!

Christian

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (4 of 7), Read 21 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Sunday, March 14, 2004 05:42 PM


I fixed some bugs in the macro and improved the help.

The online help is now taken from the macro's documentation.
I call that "INLINE-ONLINE-HELP for macros".
For details see the so named message in this conference in June 2002.

I first tried to use a scrollable DI_1() dialog to display the help.
Unfortunately the font used in DI_1() is a proportional one.
And so it's very hard to format a table-like text readable.
Only floating text is o.k.
If anyone is intersted to see the problem:
http://ziemski.privat.t-online.de/vedit/macros/dir-fdouble-x.vdm

So I removed the DI_1() again and the help is still displayed in a
normal VEDIT text window.

Ted:
Do you think it would be possible to be able to choose a font in
DI_1() in a future version of VEDIT?
At least a proportional and a fixed one...


Here is the correct macro:

http://ziemski.privat.t-online.de/vedit/macros/dir-fdouble.vdm

Christian

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (5 of 7), Read 22 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Sunday, March 14, 2004 06:59 PM

At 05:43 PM 3/14/2004, you wrote:
>Ted:
>Do you think it would be possible to be able to choose a font in
>DI_1() in a future version of VEDIT?
>At least a proportional and a fixed one...

It would need to be a option for each "text" parameter. It would be ugly to have button text, etc, in a fixed font. However, I don't know if that is possible. It might be better to have a multi-line edit-control (like a mini-Notepad) as a new DI_1 item; that could display in any type of font.

However, all this is going to be a low priority suggestion.

Ted.

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (6 of 7), Read 21 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Monday, March 15, 2004 05:16 AM

On 3/14/2004 6:59:40 PM, Ted wrote:
>
>It would need to be a option for each "text" parameter.
>It would be ugly to have button text, etc, in a fixed font.

Hmm, yes. that's correct. Not so good.

>However, I don't know if that is possible. It might be
>better to have a multi-line edit-control

Good idea, but:
(Too) much work for a little thing.

>However, all this is going to be a low priority suggestion.

Absolutely!
There are other more important features we want to have! ;-))


So I used another way to format the DI_1() output with TABs.

Here is the new version:

http://ziemski.privat.t-online.de/vedit/macros/dir-fdouble-x.vdm

Since I now like the new version I'll continue to work on this one and stop the normal-window-help one.

Christian

 


Topic: Re: DIR-FDOUBLE - Helper tool for finding double files (7 of 7), Read 21 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, March 18, 2004 04:04 PM

Some days ago I wrote:
>Since I now like the new version I'll continue to work on this one and stop the
>normal-window-help one.

So from now on
http://ziemski.privat.t-online.de/vedit/macros/dir-fdouble.vdm

is the "official" one, using the online help via DI_1().
(And with a few fixes.)

Christian