Page 1 of 1
File Copy Process
Posted: Fri Nov 15, 2013 10:56 am
by Cliff Wiernik
I currently use something like this to copy files to make a static copy of month-end files.
xxcopy g:\livedata g:\backupeomSep10 /s/e
I would like to do something like this from within an express application.
I know Express++ has dc_filecopy, but that uses low level fread and fwrite functions, which I don't know would be as fast. Is there any better way to duplicate this but within a Xbase++/Express++ dialog interface.
Cliff.
Re: File Copy Process
Posted: Fri Nov 15, 2013 12:37 pm
by Auge_Ohr
Cliff Wiernik wrote:is there any better way to duplicate this but within a Xbase++/Express++ dialog interface.
i like to use Windows API SHfile Function as Explorer use it include Progressbar etc..
this Sample is from Phil Ide (?) and use pure Xbase++ and BAP ( ot4xb Version avaiable )
SHFile-Class
What it does :
Provides a wrapper for the SHFileOperation-API function
Which methods are avalaible for the "public" :
Well, they do just what their names are telling !
For further explanations see the header of each method
Copy
Move
Rename
Delete
SHFile needs the BAP-Library from Alaska to work correctly, so
be sure that you provide the BAP.DLL with your programs.
Re: File Copy Process
Posted: Fri Nov 15, 2013 12:43 pm
by Cliff Wiernik
Thanks, I will look at this. Need to incorporate browsing the file directory tree to duplicate the tree and the /s provisions of xcopy.
Any idea on the performance of the shfile copy function. Sort of like comparing copy versus xcopy. Xcopy is much faster because it buffers data.
Re: File Copy Process
Posted: Fri Nov 15, 2013 1:11 pm
by Auge_Ohr
Cliff Wiernik wrote:Any idea on the performance of the shfile copy function. Sort of like comparing copy versus xcopy. Xcopy is much faster because it buffers data.
SHfile API is what Explorer use when copy,move,rename,delete File so Performance is same.
yes DOS Command Xcopy or RoboCopy are faster ... but have no Animation
