Copy Command
Copy Command
(OP)
Dear All
I have this application which has a part where I have to copy large files (GBs).
the problem is while copying , when I start anything the screen goes blank. of course because the copying is in progress but the user thinks that it is hanged up.
so is there a way to show the progress of the file copying (not necesserly the copy command, and way to copy large files from clarion)
Iam using clarion 6.3
Best Regards
I have this application which has a part where I have to copy large files (GBs).
the problem is while copying , when I start anything the screen goes blank. of course because the copying is in progress but the user thinks that it is hanged up.
so is there a way to show the progress of the file copying (not necesserly the copy command, and way to copy large files from clarion)
Iam using clarion 6.3
Best Regards
RE: Copy Command
Any ideas
Regards
RE: Copy Command
RE: Copy Command
Iam using clarion copy command but I dont know how to apply the progress bar with the copy command as it has only two parameters : COPY(file,new file) and cant put any order while the copy in process (as far as I know).
I will be so thankful if you give an idea how to apply the progress bar while copying.
Best regards
RE: Copy Command
1. Place a 'Progress control' on the window (Use var defaults to 'Progress1'.
2. When the button on the window is pressed that initiates the COPY command I have the following code at the buttons 'Accepted' embed point. In my case I am backing up *.tps files to a user selected drive.
The 'FullDirectoryName' is the backup Path
ie. first confirm Path is OK, something like...
FullDirectoryName = CLIP(LOC:DriveLetter) &':\FolderName'
IF EXISTS(FullDirectoryName) !Path is OK - continue
ELSE
X# = MkDir(FullDirectoryName) !Create the directory (MkDir defined in the Global Embeds)
END
You will need this in the Global Embeds at the 'Inside the Global Map' to create user defined folders
MODULE('WINAPI')
!added so can create MyDirectoryName
MkDir(*CSTRING),SHORT,RAW,NAME('_mkdir')
END
Then the code for the button that initiates the COPY command...
LOC:FileName = 'File1.tps'
IF EXISTS(LOC:FileName)
COPY(LOC:FileName,FullDirectoryName)
IF ERRORCODE()
DO BackupError !Error Message
CYCLE
END
END
Progress1 = 30 !Use Var in Progress control + ie. 30% full
DISPLAY()
LOC:FileName = 'File2.tps'
IF EXISTS(LOC:FileName)
COPY(LOC:FileName,FullDirectoryName)
IF ERRORCODE()
DO BackupError
CYCLE
END
END
Progress1 = 65 !Use Var in Progress control + 65% full
DISPLAY()
LOC:FileName = 'File3.tps'
IF EXISTS(LOC:FileName)
COPY(LOC:FileName,FullDirectoryName)
IF ERRORCODE()
DO BackupError
CYCLE
END
END
Progress1 = 100 !Use Var in Progress control + 100% full
DISPLAY()
RE: Copy Command
thank you for the reply, but my problem is that I am copying a big file (more than 7GB). the thing that it takes time to copy through the network (approx. 7 minutes). what I want is to have some changeable effect to tell the user that the copy is still running. Now I am putting a "wait" prompt until it is done but it is not enough because if user opens any other window and goes back to my screen it will be blank until the copy process finishes.
If you have any ideas we can share I'll be thankful.
Best Regards
RE: Copy Command
RE: Copy Command
Regards