Hi,

My program has worked fine for the last few months, but today I started getting the above error. Here's my code:

Code:
Private Sub backupFile()
    Dim dateToday
    Dim RetVal As String
    Dim fileDate As Date
    
    dateToday = "_" & Format(Now, "mm-dd-yyyy")
    If fileType <> "" Then
        newFileName = Mid(fileName, 1, InStr(fileName, ".") - 1) & dateToday & Mid(fileName, InStr(fileName, "."))
    ElseIf current_File_Name <> FINISHED_FILE Then
        newFileName = Mid(fileName, 1, InStr(fileName, ".") - 1) & "_bad_file_name_" & Mid(fileName, InStr(fileName, "."))
    End If
    
    newPathName = BACKUP_PATH & newFileName
    RetVal = Dir$(newPathName)
    If RetVal <> "" Then
        Kill newPathName
    End If
    
    Name PATH_NAME & fileName As newPathName
    Call getAttributes(newPathName)
    Call setAttributes(newPathName)
End Sub
I'm working on this code today, but I'm only working on deleting duplicates from the database tables. I haven't done anything with the files for over a month, so I don't know what happened...

The code is run on the same machine as the files and database, so there's no network programming. I haven't done *anything* to the file system.

Help! Thanks in advance!

teresa