you got a excel file in one folder eg a.xls in folder fred
you got a excel file in another folder eg b.xls in folder astaire
you want astaire/b.xls to be called a.xls?
WIll there only ever be one xls file in this particular folder?
this will return you the first xls file
dim sFile as string
sFile = dir$("c:\myparticularfolde
given this name, you can rename the other file
chdir("c:\otherdir")
filecopy oldname, sFile
kill oldname
Main Topics
Browse All Topics





by: satheeshmPosted on 2009-05-14 at 12:53:41ID: 24388975
Dim objFSO ting.FileS ystemObjec t")
Set objFSO = Server.CreateObject("Scrip
fso.moveFile oldfilename, newfilename
Set objFSO = Nothing
filenames with complete path.