In a Microsoft Access module, I enter thru an input box a path for a directory in Explorer (C:\Data\Music\Renumbering) called SourceDir and also a Destindir (C:\Data/Music\Renumbering_1) and I import the name of several files. I renumber the files in a table in Access to be in a specific order.
When I try to rename the original files in the Source directory with the statement ( Name SourceDir & OldFileName As DestinDir & NewFileName)
I get the message file: File not found.
However If I redefine the SourceDir as follows : SourceDir = "C:\Data\Music\Renumbering\" and the DestinDir as "C:\Data\Music\Renumbering_1\" then the statement, Name SourceDir & OldFileName As DestinDir & NewFileName, works.
What should be in the Name statement to make it works with the SourceDir and DestinDir entered thru the Input box.
When I try to rename the original files in the Source directory with the statement ( Name SourceDir & OldFileName As DestinDir & NewFileName)
I get the message file: File not found.
However If I redefine the SourceDir as follows : SourceDir = "C:\Data\Music\Renumbering\" and the DestinDir as "C:\Data\Music\Renumbering_1\" then the statement, Name SourceDir & OldFileName As DestinDir & NewFileName, works.
What should be in the Name statement to make it works with the SourceDir and DestinDir entered thru the Input box.