display the folder counter during the synch read operation
Moderators: Hacker, petermad, Stefan2, white
-
- Senior Member
- Posts: 202
- Joined: 2010-12-12, 10:05 UTC
- Location: Amiens
display the folder counter during the synch read operation
hi,
i have a big partition with lot of folder.
when i do synch operation, the first operation of TC is to read the folder.
During this operation, there is information in the status bar which indicates that he's current reading X folders.
and this operation takes a lot of time.
So to improve the wait, you souhld display :
reading XXX / total folders counts and not Reading XXXX folders...
it is obvious and very userful to know that !
best regards
i have a big partition with lot of folder.
when i do synch operation, the first operation of TC is to read the folder.
During this operation, there is information in the status bar which indicates that he's current reading X folders.
and this operation takes a lot of time.
So to improve the wait, you souhld display :
reading XXX / total folders counts and not Reading XXXX folders...
it is obvious and very userful to know that !
best regards
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
Good idea, but how is TC supposed to know the total number of directories when it has just begun to iterate through them?
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Senior Member
- Posts: 202
- Joined: 2010-12-12, 10:05 UTC
- Location: Amiens
well easy task! windows know it, it is in the property of each folder or root or disk (like left click mouse property on a folder). Even the WMI object instructions can provide such information.Dalai wrote:Good idea, but how is TC supposed to know the total number of directories when it has just begun to iterate through them?
Regards
Dalai
Even this counter is not continue to increase stupidely because once it finished the source disk (when it finished to cataloged it in memory), then it goes on with the destination drive to catalog it to. During this second pass, the counter even not restart to 0, it should go back to ZERO after the source folders read pass ..
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
And Windows knows that how? Right, by iterating through the whole directory structure, which is exactly what TC does. So we're back to square one.Michael REMY wrote:well easy task! windows know it, it is in the property of each folder or root or disk (like left click mouse property on a folder).
Can you provide more specific information about that? Which class and which property provide that information?Even the WMI object instructions can provide such information.
Not really. Or rather: not unless some information about the drive (source/destination) is displayed so that the user knows if either source or target is currently being examined. If the counter resetted without such info, there's no way to know if TC is reading the source or destination structure. I guess, that's why TC currently behaves like this.[...] it should go back to ZERO after the source folders read pass ..
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Senior Member
- Posts: 202
- Joined: 2010-12-12, 10:05 UTC
- Location: Amiens
the information about WMI object under windows class
http://blogs.technet.com/b/heyscriptingguy/archive/2004/11/18/can-i-use-a-script-to-determine-the-size-of-a-folder-on-a-remote-computer.aspx
i got a external usb disk of more 20000 folders and the same on my local computer.
each time i have to do a synch is a boring thing because i did not know (before the synch task to do), how many time will the analyse long (folder read before the bilan).
in the first 15min, i hear my internal hardrive running (and see the light red) then after 20000, i can hear my external hard disk is been analyszing too...
let me ask you a question : as tc is now 64bits, why don't you create 2 processes/threads to read-analyse the 2 sources in the same time ?
http://blogs.technet.com/b/heyscriptingguy/archive/2004/11/18/can-i-use-a-script-to-determine-the-size-of-a-folder-on-a-remote-computer.aspx
i got a external usb disk of more 20000 folders and the same on my local computer.
each time i have to do a synch is a boring thing because i did not know (before the synch task to do), how many time will the analyse long (folder read before the bilan).
in the first 15min, i hear my internal hardrive running (and see the light red) then after 20000, i can hear my external hard disk is been analyszing too...
let me ask you a question : as tc is now 64bits, why don't you create 2 processes/threads to read-analyse the 2 sources in the same time ?
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
I'm pretty sure it gets information by the same enumeration. Otherwise Windows Explorer could display folder sizes immediately instead of wasting your time (try opening C:\Windows folder properties and check how many time it will need to enumerate all subitems).the information about WMI object under windows class
It is possible with 32-bit too, no problem here. But problem is when source and target physically on the same device - simultaneous access won't speed operation up. I agree that when source and target are on separate devices, two reading threads instead of one may be useful.let me ask you a question : as tc is now 64bits, why don't you create 2 processes/threads to read-analyse the 2 sources in the same time ?
I justed tested this and it's the same as with normal functions/programs: the system iterates through the entire directory structure. It's logical that it does, because it's not possible in any other way. Don't know if reading the MFT would do any good here, but that only applies to NTFS, not FAT, FTP, or any plugins TC can sync with.Michael REMY wrote:the information about WMI object under windows class
http://blogs.technet.com/b/heyscriptingguy/archive/2004/11/18/can-i-use-a-script-to-determine-the-size-of-a-folder-on-a-remote-computer.aspx
Yes, I know that feeling. But I let TC read the structure in the background while I'm working on other things, because I know that it takes a while to complete before the actual sync can be started.each time i have to do a synch is a boring thing because i did not know (before the synch task to do), how many time will the analyse long (folder read before the bilan).
in the first 15min, i hear my internal hardrive running (and see the light red) then after 20000, i can hear my external hard disk is been analyszing too...
Hm, doesn't have to do with 64 bit, but that may be worth thinking about. However, I don't know if this can be done; only Ghisler can answer this. And, as MVV pointed out, this has to be used with caution when source and target are on the same physical device since this will massively slow down the entire process (which is the opposite you'd want to achieve).let me ask you a question : as tc is now 64bits, why don't you create 2 processes/threads to read-analyse the 2 sources in the same time ?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
We already have the (voluntary) option in:MVV wrote:But problem is when source and target physically on the same device - simultaneous access won't speed operation up. I agree that when source and target are on separate devices, two reading threads instead of one may be useful.
Copy/Delete -> The following drive letters are on the same physical harddisk.
Seems one good point to start.
Also I'm pretty sure that there are ways do find out about partitions/drives programmatically.
It might be hard to do it w/o admin rights and/or on all OSes though.
TC plugins: PCREsearch and RegXtract
I found the example of detection device number by drive letter. It doesn't require administrator rights.
This detects device numbers for all drive letters:
It returns 0 for my first HDD device (C:, D:, E:, F:), 1 for my second HDD device (R:) and 2 for attached USB device (mobile phone SD-card), also it enumerates CD-ROM devices:
This detects device numbers for all drive letters:
Code: Select all
#include <WinIoCtl.h>
for (DWORD mask = GetLogicalDrives(), drive_letter = 'a'; mask; mask >>= 1, ++drive_letter) {
if (!(mask & 1)) continue;
wchar_t volume_path[16];
wsprintf(volume_path, L"\\\\.\\%c:", drive_letter & ~0x20);
int drive_type = -1, drive_number = -1;
HANDLE hvol = CreateFile(volume_path, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
if (hvol != INVALID_HANDLE_VALUE) {
STORAGE_DEVICE_NUMBER sdn;
DWORD bytes = 0;
if (DeviceIoControl(hvol, IOCTL_STORAGE_GET_DEVICE_NUMBER, 0, 0, &sdn, sizeof(sdn), &bytes, 0)) {
drive_type = sdn.DeviceType;
drive_number = sdn.DeviceNumber;
}
CloseHandle(hvol);
}
printf("%S: type: %d, no: %d\n", volume_path, drive_type, drive_number);
}
\\.\A:: type: -1, no: -1
\\.\C:: type: 7, no: 0
\\.\D:: type: 7, no: 0
\\.\E:: type: 7, no: 0
\\.\F:: type: 7, no: 0
\\.\G:: type: 2, no: 0
\\.\J:: type: 7, no: 2
\\.\M:: type: 2, no: 1
\\.\N:: type: 2, no: 2
\\.\O:: type: 2, no: 3
\\.\P:: type: 2, no: 4
\\.\R:: type: 7, no: 1