Simon wrote:
Dear reader,
I have a table with two fields, the fields are FileNameOld and
FileNameNew.
Now I am looking for VBA code to search in a system folder for the
FileNameOld and change the filename to the FileNameNew.
I am thankful for any help.
Kind regards,
Simon
Dir("path to file") will tell you if the file exists. It will return the file
name if it does or return a zero length string "" if it does not.
The Name command can be used to change the name once you determine that the file
does exist.
Name "full path to old file name" As "full path to new file name"
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com