Page 1 of 1

Posted: Tue Jul 02, 2002 6:58 am
by BackupUser
Restored from previous forum. Originally posted by JoRo.

I have the problem, that the operation works, the first time, it is called, but the second call fails, because the file ist not found. Restartinmg the programm and the first time it works again, so the file is there.

Johannes

Code: Select all

 
Structure ShOpCopy
	hWnd.l; As Long
    wFunc.l; As Long
    pFrom.s; As String
    pTo.s; As String
    fFlags.w; As Integer
    fAborted.b; As Boolean
    hNameMaps.l; As Long
    sProgress.s; As String
EndStructure

Structure ShOpDel
	hWnd1.l; As Long
    wFunc1.l; As Long
    pFrom1.s; As String
    pTo1.s; As String
    fFlags1.w; As Integer
    fAborted1.b; As Boolean
    hNameMaps1.l; As Long
    sProgress1.s; As String
EndStructure

Global My.ShOpCopy, My2.ShOpDel

Procedure.s AutoBackup()

Del=My2.ShOpDel
My2\wFunc1=#FO_DELETE
My2\pFrom1=Grundpfad2.s+"AutoBackup\*"
My2\fFlags1=#FOF_NOCONFIRMATION

SHFileOperation_(Del)

COP=My.ShOpCopy
My\fFlags=#FOF_MULTIDESTFILES
My\pFrom =Grundpfad2.s+"Adressen"
MessageRequester("copy von ",My\pFrom,#PB_MessageRequester_Ok )
My\pTo =Grundpfad2.s+"AutoBackup"
MessageRequester("copy to ",My\pTo,#PB_MessageRequester_Ok )
My\wFunc=#FO_COPY

SHFileOperation_(COP)


EndProcedure


Edited by - JoRo on 02 July 2002 08:04:47

Edited by - JoRo on 02 July 2002 11:00:55

Posted: Tue Jul 02, 2002 9:33 am
by BackupUser
Restored from previous forum. Originally posted by PB.

> I have the problem, that the operation works, the first time, it is called, but
> the second call fails, because the file ist not found.

What is your app trying to do? Looks like a file copy?


PB - Registered PureBasic Coder

Posted: Tue Jul 02, 2002 9:56 am
by BackupUser
Restored from previous forum. Originally posted by JoRo.

well,
first empty the Autobackupfolder, then copy the adressfiles in the Autobackupfolder folder.

Johannes

Posted: Wed Jul 03, 2002 7:19 am
by BackupUser
Restored from previous forum. Originally posted by JoRo.

No expert here for ShFileOperations?
Johannes

Posted: Wed Jul 03, 2002 5:07 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
No expert here for ShFileOperations?
Johannes
Sorry but I never used it.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Mon Sep 02, 2002 9:51 pm
by BackupUser
Restored from previous forum. Originally posted by PB.

> first empty the Autobackupfolder

Use the DeleteFile command?

> then copy the adressfiles in the Autobackupfolder folder.

Use the CopyFile command?


PB - Registered PureBasic Coder