Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wait window message

Status
Not open for further replies.

channelmaster

Technical User
Dec 9, 2001
52
PH
How can you put the files you are copying in a wait window?
I used RUN XCOPY for my backup and I want to know on how to place a code in the WAIT WINDOW the files that are copying. HELP, PLEASE! thanks,
Rene
 
channelmaster

You can copy an .exe or other file even if it is in use, (an exception being VFP tables), by using a WinAPI call.

DECLARE INTEGER CopyFile IN kernel32;
STRING lpExistingFileName,;
STRING lpNewFileName,;
INTEGER bFailIfExists

lnRetVal = CopyFile(laFiles(i,1),[A:\]+laFiles(i,1),0)
IF lnRetVal = 0
[tab]* Error message - file not copied
ENDI
FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Dear Chris,

Sorry for taking me so long to respond because I was confuse on your code. Can you be more specific on how to do it? scenario is this; i will copy file from c:\mydata\ to mydestination(e.g. a:\). Thanks for being patient with me.
 
HI
**********************************************
DECLARE INTEGER CopyFile IN kernel32;
STRING lpExistingFileName,;
STRING lpNewFileName,;
INTEGER bFailIfExists

nFiles = ADIR(laFiles,"c:\mydata\*.*")

FOR I=1 to nFiles
lnRetVal = CopyFile(laFiles(i,1),[A:\]+laFiles(i,1),0)
IF lnRetVal = 0
* Error message - file not copied
WAIT WINDOW laFiles(i,1)+" Not copied. Press any Key"
ELSE
WAIT WINDOW laFiles(i,1)+" Copied Success!" NOWAIT
ENDIF
ENDFOR
*******************************************
No checking for floppy .. no checking if the files total size exceeds the available floppy space.. no offer to change over the floppy in case full.. i.e. span of disks..

All these can be achieved with lot more code. :)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Dear Ramani,
Thanks for helping me solve my problem. Your codes work and I just add some codes like "getdir()" and "diskspace()" my works is complete. Again, Thank you and merry christmas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top