INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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


RE: Copy Command

(OP)
Hi everybody,

Any ideas

Regards

RE: Copy Command

If using the Clarion COPY command you can place a PROGRESS control in your app to indicate progress to the user (see PROGRESS in the help). If you are exiting to DOS to Copy (ie. a batch file) then you might consider looking into using the Clarion COPY command within you app instead?

RE: Copy Command

(OP)
Thank you TinLegs for your reply.
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

Not to sure if its the best way but it works for me...

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

(OP)
Hi TinLegs,

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

How about comparing destination file size with oryginal ?

RE: Copy Command

(OP)
gettig the size is easy by using GetFileSize function (if that is the question). but still it does not solve my problem that no action can be performed while the copy is in progress. Further more, the copy command create a dump file with the same size as original from the beginig of the copy process. so no use of knowing the destination file size.

Regards

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close