G
gamesforums
How can i remove the .sql extension from my script files?? I want to
read all scripts in directory into a hashtable, and use
Right(scriptFile.FullName, 3) as my key and full name as value:
'buildscript_001.sql
'buildscript_002.sql
'Want to have 001 as key and buildscript_001.sql as value.
Dim scriptDirectory As New IO.DirectoryInfo "C:\Applications
\MyApplicationMainline\SW\App\DatabaseScripts\BuildScripts\")
Dim scriptFileList As IO.FileInfo() =
scriptDirectory.GetFiles()
Dim scriptFile As IO.FileInfo
Dim scriptFileTable As New Hashtable
For Each scriptFile In scriptFileList
'Read scripts to Hash tbl..
scriptFileTable.Add(Right(scriptFile.FullName, 3),
scriptFile.FullName)
Next
Regards
Mcad
read all scripts in directory into a hashtable, and use
Right(scriptFile.FullName, 3) as my key and full name as value:
'buildscript_001.sql
'buildscript_002.sql
'Want to have 001 as key and buildscript_001.sql as value.
Dim scriptDirectory As New IO.DirectoryInfo "C:\Applications
\MyApplicationMainline\SW\App\DatabaseScripts\BuildScripts\")
Dim scriptFileList As IO.FileInfo() =
scriptDirectory.GetFiles()
Dim scriptFile As IO.FileInfo
Dim scriptFileTable As New Hashtable
For Each scriptFile In scriptFileList
'Read scripts to Hash tbl..
scriptFileTable.Add(Right(scriptFile.FullName, 3),
scriptFile.FullName)
Next
Regards
Mcad