This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

new simple packer plugin
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
gigaman
Member
Member


Joined: 14 Feb 2003
Posts: 128

PostPosted: Fri Feb 13, 2004 8:58 am    Post subject: Reply with quote

TC calls 16-bit wc32to16, and wc32to16 simply calls Int21 (probably using the DOS3CALL function, exported from the 16bit kernel).
However, TC sets LastWriteTime only...
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35956
Location: Switzerland

PostPosted: Fri Feb 13, 2004 9:29 am    Post subject: Reply with quote

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...

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

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.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fg_2002fr
Senior Member
Senior Member


Joined: 24 Feb 2003
Posts: 267
Location: Tours (France)

PostPosted: Fri Feb 13, 2004 10:11 am    Post subject: Reply with quote

Please Christian, could I use wc32to16 to change date and time of a directory under win9x? and how can I do ?

Quote:
create the folder, then copy its contents, and only after copying set its date.

yes, that's what I did in ver 1.02
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35956
Location: Switzerland

PostPosted: Fri Feb 13, 2004 10:20 am    Post subject: Reply with quote

Yes you can. Here is some Delphi code from TC which shows how to call wc32to16:

Code:
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
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gigaman
Member
Member


Joined: 14 Feb 2003
Posts: 128

PostPosted: Fri Feb 13, 2004 2:23 pm    Post subject: setting the directory timestamp from Win32 Reply with quote

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
Back to top
View user's profile Send private message
fg_2002fr
Senior Member
Senior Member


Joined: 24 Feb 2003
Posts: 267
Location: Tours (France)

PostPosted: Mon Feb 16, 2004 2:56 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gigaman
Member
Member


Joined: 14 Feb 2003
Posts: 128

PostPosted: Mon Feb 16, 2004 10:11 am    Post subject: Reply with quote

Well, I believe the code should work the same as w32to16.exe (though I didn't actually test). I.e., it should set the LastWriteTime correctly (just pass NULL for the other timestamps)... or it doesn't?
Back to top
View user's profile Send private message
pdavit
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 1525
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space

PostPosted: Sun Oct 10, 2004 9:51 am    Post subject: Reply with quote

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!
_________________
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
fg_2002fr
Senior Member
Senior Member


Joined: 24 Feb 2003
Posts: 267
Location: Tours (France)

PostPosted: Wed Nov 03, 2004 11:31 am    Post subject: Reply with quote

Hello panos!

Yes I think I could modify Dircopy to run your way
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pdavit
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 1525
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space

PostPosted: Wed Nov 03, 2004 11:45 am    Post subject: Reply with quote

fg_2002fr wrote:
Hello panos!

Yes I think I could modify Dircopy to run your way


Thanks a lot! Smile
_________________
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
fg_2002fr
Senior Member
Senior Member


Joined: 24 Feb 2003
Posts: 267
Location: Tours (France)

PostPosted: Thu Nov 04, 2004 9:10 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
thuan ha
Junior Member
Junior Member


Joined: 04 Jun 2018
Posts: 2

PostPosted: Mon Jun 04, 2018 8:24 pm    Post subject: Failed by FILE NAME Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklńrung | Politique de ConfidentialitÚ

Using phpBB © phpBB Group