new simple packer plugin
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, wc32to16 calls DOS3CALL because there is no official documented 32-bit function to call int21h from 32-bit code. And indeed TC sets Last write time only. Why?
- Creation time should be set to the time when the file/dir was really created
- Access time is changed by windows anyway when you write to the dir
- Last write time should be preserved, because the file wasn't really modified when copied...
- Creation time should be set to the time when the file/dir was really created
- Access time is changed by windows anyway when you write to the dir
- Last write time should be preserved, because the file wasn't really modified when copied...
This means that you copied some files to the folder AFTER setting its date. I made the same error in TC 6.0. Solution: create the folder, then copy its contents, and only after copying set its date.dates are first changed but if you enter in one of this directory, date changes automatically
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes you can. Here is some Delphi code from TC which shows how to call wc32to16:
Code: Select all
type TSetAttrStruct=packed record
setmode:longint;
datetime:longint;
filename:array[0..259] of char;
end;
const WincmdSetDate='Wincmd32to16App';
var buf:array[0..MAX_PATH-1] of char;
cds:tCopyDataStruct;
tds:TSetAttrStruct;
wait:integer;
wnd:=FindWindow(WincmdSetDate,WincmdSetDate);
if wnd=0 then begin
strplcopy(buf,paramstr(0),sizeof(buf)-1);
p:=StrRScan(pch,'\');
if p<>nil then p[1]:=#0;
strlcat(buf,'wc32to16.exe',sizeof(buf)-1);
if ShellExecute(hwindow,'open',buf,'wincmd32','c:\',sw_hide)>=32 then begin
wait:=0;
repeat
sleep(100);
wnd:=FindWindow(WincmdSetDate,WincmdSetDate);
inc(wait);
until (wnd<>0) or (wait>=30);
end else TryLoadDateSet:=false;
end;
if wnd<>0 then begin
cds.dwData:=1;
tds.setmode:=changedatetime; {1=date, 2=time, 3=both}
tds.datetime:=SetTheTime;
chartooem(changename,tds.filename); {Must be DOS name!}
cds.cbData:=sizeof(tds);
cds.lpData:=@tds;
SendMessage(wnd,wm_copydata,0,longint(@cds));
end;
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
setting the directory timestamp from Win32
If anybody is interested in the code that makes it possible to call the necessary INT21 function directly from Win32 code, it can be downloaded here:
http://www.fortunecity.com/skyscraper/sunplace/289/settime.htm
http://www.fortunecity.com/skyscraper/sunplace/289/settime.htm
This new version support preservation of date under win9x
and use Wc32to16.exe program ( thanks to C. Ghisler)
You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy103.zip
Size: 8 KB
to gigaman
I tried your code, and effectively, it works ... sometimes. it is why I would rather use dos3call from Christian.
however, if you found why it doesn't work, please, inform me.
and use Wc32to16.exe program ( thanks to C. Ghisler)
You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy103.zip
Size: 8 KB
to gigaman
I tried your code, and effectively, it works ... sometimes. it is why I would rather use dos3call from Christian.
however, if you found why it doesn't work, please, inform me.
- pdavit
- Power Member
- Posts: 1529
- Joined: 2003-02-05, 21:41 UTC
- Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
- Contact:
Dear Francois,
I was wondering if it would be possible to add an option in the configurations of DirCopy where we'll be able to define the depth level of the directory copying.
70% of the cases I need to use DirCopy to recreate the structure of my software tools collection in order to keep it updated with future releases. Now, most of the times though I only need two dir levels to be copied, one which is the category and one which corresponds to the individual tools. But most of the times I have folders deeper down the dir structure which I don't actually need.
Here's an example:
MULTIMEDIA TOOLS
...|__WINAMP PLAYER
......|__SKINS
......|__PLUG-INS
Now, it would be nice to be able to configure DirCopy to copy dirs only two levels down (depending from where I'm executing DirCopy) so that my destination panel will only hold this structure:
MULTIMEDIA TOOLS
...|__WINAMP PLAYER
Can this be possible in the future? Thanks!
I was wondering if it would be possible to add an option in the configurations of DirCopy where we'll be able to define the depth level of the directory copying.
70% of the cases I need to use DirCopy to recreate the structure of my software tools collection in order to keep it updated with future releases. Now, most of the times though I only need two dir levels to be copied, one which is the category and one which corresponds to the individual tools. But most of the times I have folders deeper down the dir structure which I don't actually need.
Here's an example:
MULTIMEDIA TOOLS
...|__WINAMP PLAYER
......|__SKINS
......|__PLUG-INS
Now, it would be nice to be able to configure DirCopy to copy dirs only two levels down (depending from where I'm executing DirCopy) so that my destination panel will only hold this structure:
MULTIMEDIA TOOLS
...|__WINAMP PLAYER
Can this be possible in the future? Thanks!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Christian Ghisler Rules!!!
it's done, but I haven't test anymore.
You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy104.zip
Size: 9 KB
1.04 - 04.11.2004
- Added : "Choose Depth" option
- Added : automatic plugin installation (TC 6.5 and above)
You can download it here:
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy104.zip
Size: 9 KB
1.04 - 04.11.2004
- Added : "Choose Depth" option
- Added : automatic plugin installation (TC 6.5 and above)
Failed by FILE NAME
I am using Dir Copy ver 1.10.
I see the window like this:
h-t-t-p-s-:-/-/-g-o-o-.-g-l-/-1-h-c-f-G-4
(delete all -)
It mention error in FILE NAME, but we need copying FOLDER NAME only. Why is it affected?
Edit by mod:
https //goo.gl/ 1hcfG4
https://goo.gl/1hcfG4
Example:
folder\folder name\foldername\file name with Ö and Ä.ext
Error because of the Ö and Ä in FILEname. Why that, as we copy folder structure only?
I see the window like this:
h-t-t-p-s-:-/-/-g-o-o-.-g-l-/-1-h-c-f-G-4
(delete all -)
It mention error in FILE NAME, but we need copying FOLDER NAME only. Why is it affected?
Edit by mod:
https //goo.gl/ 1hcfG4
https://goo.gl/1hcfG4
Example:
folder\folder name\foldername\file name with Ö and Ä.ext
Error because of the Ö and Ä in FILEname. Why that, as we copy folder structure only?