I have an application that exports data to a .csv file everyday to the same folder on a Server. the file name is static.. always FILENAME_S.csv
now I have a requirement to send this file daily to the Vendor that hosts our companies website. They are requiring me to send the file in the following format: Companyname_YYYYMMDD.csv (I substituted the '.' in the filename with '_')
This is erroring out on line 1 character 12 'expected end of statement' not sure what is wrong ????
Dim myFile as String
Dim myNewFile as String
myfile = "C:\filename_s.csv"
myNewFile = "C\newfilename" & Format(Date, "yyyymmdd") & ".csv"
Name myfile As myNewFile
You seem to be using ASP, and not VB.
ASP doesn't support the use of declaring a variable as typed variables. They are ALL variants.
The correct format is Dim myFile.
Also, I don't believe that ASP supports the Name sub. I believe you'll need to use fso to rename the file.
I'm moving this thread to the correct forum.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert
Because he posted in an ASP forum. Plus he is a VB Developer and I have used VBScript inside ASP which he can understand without a single problem. Also IIS is free available with Windows Server OS so ASP page can be integrated with windows scheduler without any issue.
That's not what I meant
It simply feels like a bizzare platform to acheive our goal. But I guess if that's what (s)he is familiar with then there's no harm done. It just occured to me that it'd be far easier doing it another way. Also, if this is in ASP it can't be a scheduled jo, it'd run every time you visit the page?