You're confusing me.  A file is created and edited; the backup file for it will have the same name as the backup file for it.  Apparently.
I think you meant something else, like that the directory it's in shall be already exist as a file or that the backup file name shall be the name of an extant directory; but I can't fathom what you're saying here !