So far, the program that I have created can copy the the save file to either 'Slot 1' or 'Slot 2', which refers to two folders called '1' and '2' in the backup folder
Currentely it is also set to overwrite any other file there.
The problem I am facing is that for this program to work, you must create the folders manually, or it will not work. Similarly, if you do not create the folders, there is no indication that the copy has not worked.
The source code for the copying function is as follows (taken from a code website):
Public Function APIFileCopy(src As String, dest As String, _
Optional FailIfDestExists As Boolean) As Boolean
'PURPOSE: COPY FILES
'PARAMETERS: src: Source File (FullPath)
'dest: Destination File (FullPath)
'Set to true if you don't want to
'overwrite the destination file if
'Returns (True if Successful, false otherwise)
'dim bSuccess as boolean
'bSuccess = APIFileCopy ("C:\MyFile.txt", "D:\MyFile.txt")
Dim lRet As Long
lRet = CopyFile(src, dest, FailIfDestExists)
APIFileCopy = (lRet > 0)
Is anyone able to help me understand how to make it check to see if the folder in the path already exists, and if not, create a new folder?
Thank you for any help!