Dim strNewFile As String
strNewFile = strTargetPath
strNewFile = strNewFile & Format(intMins, "00") & Format(intSecs, "00") & ".bmp"
Dim strOldFile As String
strOldFile = strTargetPath
strOldFile = strOldFile & Left$(strAr(intar), InStr(1, strAr(intar), ".") - 1) & ".bmp"
Name strOldFile As strNewFile

Here's a chunk of code I was using to rename files. (I'm looping through an array looking for gaps in the sequence; when I find a gap, I find a substitute file and rename it)

My files are on drive e: (e:wallpapertarget)

Imagine my surprise when the NAME command, contrary to my expectations bold-and-italicised below, popped up in the C: drive (in my Tools, options, Locations, USER TEMPLATES directory!)

Name oldpathname As newpathname

The Name statement syntax has these parts:

Part Description
oldpathname Required. String expression that specifies the existing file name and location