Discussion:
Copy folder without using ShFileOperation
(too old to reply)
Goofball
2006-09-27 09:48:28 UTC
Permalink
Raw Message
Can you, please, give some of your ideas for such problem. I need to
copy one folder with all files and subfolders in it to a different
folder. I need to make my own progress bars where to show the copy
speed and progresses for file copy and overall process.

I've read the shFileOperation function. Its good, but won't work here.
The only thing that comes to my mind it's using the FindFirstFile and
do the recursive copy of files. Just wanted to ask if there are some
other interesting algorithms for that.

Another question is that I need to show the overall process progress
bar, so I need to determine the folder size before doing the copy
operation. However, determining folder size recursively using
FindFirstFile is kind of time consuming on large folders, so the copy
operation doen't even start for some time. I don't know, maybe there is
some kind of a solution to that?

Thanks in advance.
j***@yahoo.co.uk
2006-09-27 21:33:23 UTC
Permalink
Raw Message
FindFirstFile is extremely quick even on large (or deep) folders so
don't worry about the time taken.

If it was me I would just run the recusive search and put up a fake
progress bar.
Post by Goofball
Can you, please, give some of your ideas for such problem. I need to
copy one folder with all files and subfolders in it to a different
folder. I need to make my own progress bars where to show the copy
speed and progresses for file copy and overall process.
I've read the shFileOperation function. Its good, but won't work here.
The only thing that comes to my mind it's using the FindFirstFile and
do the recursive copy of files. Just wanted to ask if there are some
other interesting algorithms for that.
Another question is that I need to show the overall process progress
bar, so I need to determine the folder size before doing the copy
operation. However, determining folder size recursively using
FindFirstFile is kind of time consuming on large folders, so the copy
operation doen't even start for some time. I don't know, maybe there is
some kind of a solution to that?
Thanks in advance.
Marios Theodossiou
2006-09-28 00:56:14 UTC
Permalink
Raw Message
Hi,

could you post an example of how to use the FindFirstFile example as I would
like to know how to do that. I currently use the shFileOperation function &
sometimes it's quite slow.

Thanks,
Marios
Post by j***@yahoo.co.uk
FindFirstFile is extremely quick even on large (or deep) folders so
don't worry about the time taken.
If it was me I would just run the recusive search and put up a fake
progress bar.
Post by Goofball
Can you, please, give some of your ideas for such problem. I need to
copy one folder with all files and subfolders in it to a different
folder. I need to make my own progress bars where to show the copy
speed and progresses for file copy and overall process.
I've read the shFileOperation function. Its good, but won't work here.
The only thing that comes to my mind it's using the FindFirstFile and
do the recursive copy of files. Just wanted to ask if there are some
other interesting algorithms for that.
Another question is that I need to show the overall process progress
bar, so I need to determine the folder size before doing the copy
operation. However, determining folder size recursively using
FindFirstFile is kind of time consuming on large folders, so the copy
operation doen't even start for some time. I don't know, maybe there is
some kind of a solution to that?
Thanks in advance.
Riki Wiki
2006-10-04 23:10:01 UTC
Permalink
Raw Message
Hoi

Your question is more fitting for the newsgroup
b.p.d.language.delphi.general, try to repost the question there, and do the
repost to the Borland news server to make everybody see your message.

How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups>

Loading...