Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 3 Monaten
Letzter Beitrag:
vor 3 Jahren, 3 Monaten
Beteiligte Autoren:
Patrick Thijs, Alexandre Leclerc, Fabrice Harari, Allard

FileCopy with progress

Startbeitrag von Patrick Thijs am 10.03.2015 19:44


for a project where I'm working on, I need to be able to show the progress when copying big files.
I know that the fCopyFile method can be used for this, but this isn't giving me the "feedback" that I want.
I don't want the classic Windows-style progress indication, but I want to visualise the copy-proces with a progress-bar.
Is there a way to do this in Windev ? Or do I have to write my own bit-copier ?




Hi Patrick

I'm confused

fCopyFile allows the display of a progressbar
You want a progressbar
you don't want fcopyfile

Best regards

von Fabrice Harari - am 10.03.2015 21:39
Hello Fabrice,

I want a progressbar, but not the one that fCopyFile offers.
I want to put a progress_bar in my window, for example PROGBAR_Copy and change the value of it when doing a filecopy.
As far as I know, the progressbar for fCopyFile is the "classical" windows filecopy progress window



von Patrick Thijs - am 10.03.2015 21:44
what kind of files. What do you want to display.;

1 how mutch of one file is copied?
2 how many flies from the total numer of files have been copied?

For one file . Day a tekst file that you copy you can count the total of lines and after every time you copied a line add one to a count variabele. Then base the progressbar on the count variabele.

Would problebly work some similar way. Havenot done these kinds of things.



von Allard - am 13.03.2015 07:06
The files I need to copy are mostly large video-files (up to 2 gigabytes and more).
I don't want to use the standard windows-progress window to display the progress of the copy, but I wanted to use a standard Windev Progressbar to do so.

Because it seems not to be possible to do this with Windev, I've done it otherwise.
I can have up to 4 copy-processes running at the same time, for each of these processes I display the current status to the user. This is something like "Waiting", "Copying","Done" and "Failed".
This is doing the job, it would be nicer to have a real progressbar, but we can live with it this way.



von Patrick Thijs - am 19.03.2015 19:22
Hi Patrick,

You can simply use API CopyFileEx() with a callback function to get the actual progression. This will do exactly what you want in a fairly simple way. https://msdn.microsoft.com/en-us/library/windows/desktop/aa363852(v=vs.85).aspx

Then send a suggestion to PCSoft for your customized copy progress window, just like it is possible with the FTP commands.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 19.03.2015 19:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.