File Copy Process

This forum is for eXpress++ general support.
Post Reply
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

File Copy Process

#1 Post 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.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: File Copy Process

#2 Post 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.
Attachments
ShFile.zip
(4.11 KiB) Downloaded 648 times
greetings by OHR
Jimmy

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: File Copy Process

#3 Post 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.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: File Copy Process

#4 Post 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 ;)
greetings by OHR
Jimmy

Post Reply