MrManBoy
New Member
- Joined
- May 28, 2014
- Messages
- 37
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
Hi
Trying to achieve: The code below checks the if there is a copy of that file with a predetermined extension and if not, then create the copy with the original extension. However, it has come to my attention, that despite the file names are always the same, the extensions are not. Is there a way to modify the below to accomdate this?
Cheers for any help
Trying to achieve: The code below checks the if there is a copy of that file with a predetermined extension and if not, then create the copy with the original extension. However, it has come to my attention, that despite the file names are always the same, the extensions are not. Is there a way to modify the below to accomdate this?
Code:
If Len(Dir("E:\Work\Documents\Stuff\Staff List Reports\HR Copy.[COLOR=#ff0000][B]csv[/B][/COLOR]")) = 0 Then
FileCopy "E:\Work\Documents\Stuff\Staff List Reports\HR Team Member List.[COLOR=#ff0000][B]csv[/B][/COLOR]", "E:\Work\Documents\Stuff\Staff List Reports\HR Copy.[COLOR=#ff0000][B]csv[/B][/COLOR]"
Else
MsgBox "Hey mate, you already have a saved HR Copy.", , "Heads up!"
End If
If Len(Dir("E:\Work\Documents\Stuff\Staff List Reports\HW Copy.[COLOR=#ff0000][B]xls[/B][/COLOR]")) = 0 Then
FileCopy "E:\Work\Documents\Stuff\Staff List Reports\Honeywell Cardholder List.[COLOR=#ff0000][B]xls[/B][/COLOR]", "E:\Work\Documents\Stuff\Staff List Reports\HW Copy.[COLOR=#ff0000][B]xls[/B][/COLOR]"
Else
MsgBox "Hey champ, you already have a saved HW Copy.", , "Heads up!"
End If
Cheers for any help