G
Guest
I need some assistance
I have this database that has to import 35 files everyday. NOw for checking
purpose, i have this code that once it imports all the files, it deletes all
files from that folder so user can't upload same files
I need to modify the code to first move the files first to a folder of my
choice and then delete. Please help
code:
Function DeleteFiles()
Dim fso As New Scripting.FileSystemObject
Dim fld As Scripting.Folder
Dim fil As Scripting.File
Set fld = fso.GetFolder([Forms]![Protobase Upload]![Pathtxt])
For Each fil In fld.Files
fil.Delete
Next fil
Set fso = Nothing
Set fld = Nothing
Set fil = Nothing
End Function
I have this database that has to import 35 files everyday. NOw for checking
purpose, i have this code that once it imports all the files, it deletes all
files from that folder so user can't upload same files
I need to modify the code to first move the files first to a folder of my
choice and then delete. Please help
code:
Function DeleteFiles()
Dim fso As New Scripting.FileSystemObject
Dim fld As Scripting.Folder
Dim fil As Scripting.File
Set fld = fso.GetFolder([Forms]![Protobase Upload]![Pathtxt])
For Each fil In fld.Files
fil.Delete
Next fil
Set fso = Nothing
Set fld = Nothing
Set fil = Nothing
End Function