| 
    
     |  | ▼Todd さん: 
 コメントした通り、必要なファイルフルパス文字列を作成して処理すればいいので
 どのあたりに困っておられるのかわからないのですが、一応、サンプルとして。
 
 Sub Sample1()
 Dim fso As Object
 Dim oPath As String
 Dim nPath As String
 
 Set fso = CreateObject("Scripting.FileSystemObject")
 
 oPath = "C:\古いフォルダ\元のファイル.txt"
 nPath = "c:\新しいフォルダ\元のファイル" & Format(Now, "yyyymmddsshhnn") & ".txt"
 
 On Error Resume Next
 fso.deletefile nPath  '移動先の同名のファイルを削除
 On Error GoTo 0
 
 fso.movefile oPath, nPath
 
 End Sub
 
 Sub Sample2()
 Dim oPath As String
 Dim nPath As String
 
 
 oPath = "C:\古いフォルダ\元のファイル.txt"
 nPath = "c:\新しいフォルダ\元のファイル" & Format(Now, "yyyymmddsshhnn") & ".txt"
 
 On Error Resume Next
 Kill nPath '移動先の同名のファイルを削除
 On Error GoTo 0
 
 Name oPath As nPath
 
 End Sub
 
 |  |