RogerRuntings
MIS
I am trying to extract certain elements from a weather webservice. To complete the picture I would like to copy the relevant icon from "c:\weather\" to the appropriate folder, ("c:\weather\BigImage\BigImage.png" ) based on information extracted from the retrieved XML file.
I use a "c:\weather\" main folder containing the Yahoo Weather icons; for example "21d.png" represents a particular icon. I would like to copy "21d.png" to "c:\weather\BigImage\" and rename it "BigImage.png"
The code below is adapted from a post I saw somewhere, but its generating an error:
Dim objFSO, strFilePath, strFileDestination
Dim BigImage, objFile
BigImage = "21"
StrFilePath = "c:\weather\" & BigImage & "d.png"
StrFileDestination = "c:\weather\BigImage\BigImage.png"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CopyFile(StrFilePath,StrFileDestination, True)
What am I doing wrong?
I use a "c:\weather\" main folder containing the Yahoo Weather icons; for example "21d.png" represents a particular icon. I would like to copy "21d.png" to "c:\weather\BigImage\" and rename it "BigImage.png"
The code below is adapted from a post I saw somewhere, but its generating an error:
Dim objFSO, strFilePath, strFileDestination
Dim BigImage, objFile
BigImage = "21"
StrFilePath = "c:\weather\" & BigImage & "d.png"
StrFileDestination = "c:\weather\BigImage\BigImage.png"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CopyFile(StrFilePath,StrFileDestination, True)
What am I doing wrong?