new simple packer plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, sheep, Hacker, Stefan2

User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

new simple packer plugin

Post by *fg_2002fr »

Hi all,

I have written a new packer plugin which can recreate an empty directory tree from selected sources. This plugin is very simple and small (<6KB) but I needed this functionality and if it can be usefull for others...

You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy100.zip
Size: 4 KB

or see my web pages at:
http://physio-a.univ-tours.fr/tcplugins

If you are using version.wfx from Fabio Chelly, I've made a list linked to my plugins. You can download it here http://physio-a.univ-tours.fr/tcplugins/fgplugins.zip
(Last updated : 2004.01.12)


FG
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2fg_2002fr
Thanks, nice tool.

BTW: There is no link to your new plugin in fg plugins.list.
Here it is:

Code: Select all

DirCopy|http://physio-a.univ-tours.fr/tcplugins/dircpy.htm|(as zip)|(Version |)|1.00
Anyway, everyone should add versions items to his plugins :-)
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

to djk

I just forget to update this file, I do that now.
Thanks you to point out it to me.

two lines has been added:
one for Dircpy.wcx
one for fg_plugins.list
Hammillian7
Junior Member
Junior Member
Posts: 92
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Folder time preservation? Re: new simple packer plugin

Post by *Hammillian7 »

fg_2002fr wrote:Hi all,

I have written a new packer plugin which can recreate an empty directory tree from selected sources. This plugin is very simple and small (<6KB) but I needed this functionality and if it can be usefull for others...

FG
If I want an empty (without files) tree structure copy, I select the source root folders and specify under "only files of type..." either |* for exclusion of all files or a predefined filter (e.g. ">MyDirsFilter") in which I've defined "attribute Directory"). It is slower than your plugin (16" against 5", for a reference directory set), but, now, TC661 (thanks, Ghisler, for keeping your promise!) preserves as an option (which I have always on!) the directory dates/times.

Following a good advice in this forum, I've been using RAR (a -r -tl -tsm -tsc -tsa -apBase d:\Bt\Pack . -x@C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\CMD1C.tmp) to generate a tree structure skeleton with date preservation, but it's very slow for big trees.

So, for me, it would be convenient and quicker to use your plug-in for this purpose, if you wanted to take the bother of adding time stamp preservation.

By the way, congratulations for your File info plug-in!.

Regards.


[/i]
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

to Hammillian7

I added date and time preservation but this works only on WinNT

You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy101.zip
Size: 10 KB

Remark :
CreateFile( sTemp, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
return a bad handle under Win9x, if someone can help me to get a valid handle for a directory under Win9x, it will be welcome.


web pages at:
http://physio-a.univ-tours.fr/tcplugins
User avatar
Horst.Epp
Power Member
Power Member
Posts: 4123
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I added date and time preservation but this works only on WinNT
Doesn't work under XP
Some dirs are getting the date preserved, others not.
Hammillian7
Junior Member
Junior Member
Posts: 92
Joined: 2003-07-16, 22:40 UTC
Location: Spain

It works for me under Win2k even with r/o directories

Post by *Hammillian7 »

fg_2002fr wrote: I added date and time preservation but this works only on WinNT
:D First, it's fantastic and nice that you've added it so fast since the suggestion (maybe you were thinking of doing it before?)

Date preservation, the little I've tested until now, with TC601 under W2k works well, except with read-only dirs (like the Program Files folder) (I have reported that to Ghisler in the thread where he promised to include the function in TC6). But with yours, it works even with r/o dirs.

At first, I thought it didn't work (and posted a wrong message that I'm editing to become this one), but it was just that I hadn't checked the option (with the "Configure" button, in the compressing window)

Thanks for the effort and the speed :shock: .
Hammillian7
Junior Member
Junior Member
Posts: 92
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Post by *Hammillian7 »

For whover might be interested, I've found that it has one additional advantage: if you have copied a tree (even filled with files), forgetting to activate the copy directory date option, you can still copy just the dirs date with this plug-in (as long as the destination dirs are not r/o), not affecting the file contents: just copy the dir tree as if to overwrite the destination one. (Tested with Win2k, Sp4, in the same logical drive (D:, in my HD).
User avatar
Hacker
Moderator
Moderator
Posts: 11963
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

fg_2002fr,
return a bad handle under Win9x, if someone can help me to get a valid handle for a directory under Win9x, it will be welcome.
That is unfortunately not possible (see also http://thehacker.host.sk/addtime/addtimethread.html - German).

HTH
Roman
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

to Hammillian7 and Horst.Epp

there is a real problem with some RO microsoft's installed dirs.
like "program files" or NetMeeting or "Windows Media Player"

dates are first changed but if you enter in one of this directory, date changes automatically.

to Hacker
yes I know, only direct access allow to change date and time of directories under win9x. if someone want to write and share a such piece of code ....
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

Some dirs are getting the date preserved, others not.
OK, I found the bug, it's an error of chronology
test this new version, please.
I added preservation of attributes if you want.

You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy102.zip
Size: 7 KB

1.02 - 10.02.2004
- Added : "Preserve attributes" option
- Fixed : date not preserved if there is sub-directory
gigaman
Member
Member
Posts: 130
Joined: 2003-02-14, 11:28 UTC

Post by *gigaman »

fg_2002fr wrote:yes I know, only direct access allow to change date and time of directories under win9x. if someone want to write and share a such piece of code ....
OK... I tried to write such a piece of code. The result is... questionable.
I used the Int21 way (function 7143h, called through kernel32 export 0), just as the Win9x kernel does (at least, in general). However, the results are unreliable. I can't explain why - but sometimes when I boot Windows, it works just as expected - sets all the three timestamps of given directory.
However, when I boot Windows the other time... it sets only the Last-write time of given directory - setting the other 2 timestamps returns ACCESS_DENIED :?
(Checked in Windows 95 OSR2, Windows 98, Windows ME).

I'm rather out of ideas now... checked many things, but nothing helped. If anybody has some more ideas, they are certainly welcome. For now, it may be used as "try to set the timestamps", but not "set the timestamps".

PS: I'm not going to try to code it in a diskeditor-like way :roll:
Hammillian7
Junior Member
Junior Member
Posts: 92
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Date preservation with Win9x and archive extraction

Post by *Hammillian7 »

fg_2002fr wrote: only direct access allow to change date and time of directories under win9x. if someone want to write and share a such piece of code ....
Good idea to preserve also directory attributes :) . That way, one can get a directory tree the same as the original.

It's clearly possible to preserve dir dates also under Win9x, as Total Commander does it. Good luck with it.

Other thing that I'd very much appreciate is to be able to extract the dir structure with date and attribute preservation from Zip files. Now, I've seen that your plug-in doesn't do it, because it relies on TC extracting the files, what it does changing the dir dates. I don't know how much additional work would be to do it, but it would be quite unique and useful (at least, for me) (by the way, I'd like to suggest Mr. Ghisler, the Author, (when I find out where to do it) to extend dir date preservation to archive (or, at least, Zip) extraction. )

Thanks to you.
User avatar
Hacker
Moderator
Moderator
Posts: 11963
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

It's clearly possible to preserve dir dates also under Win9x, as Total Commander does it.
TC calls the 16-bit program wc32to16 to do this.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

TC calls the 16-bit program wc32to16 to do this
ok, but how does it works
Post Reply