>Hello
>
>In my old system (@12,. ) I have used the following command to backup my data using lha;
>
>>procedure backup
>run lha a bkdbf *.dbf
>copy file bkdbf.lzh to d:\backup
>
>
>But while trying to do so in a form I am getting the error message file 'bkdbf.lzh' does not exist.
>
>Please help
>
>ChandanMake sure the path you think you are using is the same one the system is using. IOW, if your old routine creates 'bkdbf.lzh' in some folder and your prg says "copy file bkdbf.lzh to d:\backup" it is expecting it in the same folder, which may not be the case.
cFolder = "c:\temp\"
IF FILE(cFolder+"bkdbf.lzh")
copy file (cFolder+"bkdbf.lzh") to d:\backup
ELSE
ENDIF
[Update]: Also, make sure it has finished processing, as Tracy said. Although I would not use a loop as her example, but a synchronous call like through Windows API: ShellExecute or WSH: Shell.Run()