Joshua
Wed Sep 15 13:23:57 CDT 2004
I re wrote it a little..
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
strDirectoryPath="c:\images\"
Set objFileScripting = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFileScripting.GetFolder("c:\images\")
Set filecollection = objFolder.Files
For Each filename in filecollection
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordset = CreateObject("ADODB.Recordset")
objConnection.Open "DSN=Images;"
objRecordset.CursorLocation = adUseClient
objRecordset.Open "SELECT * FROM Images" , objConnection, adOpenStatic,
adLockOptimistic
objRecordset.AddNew
Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
objRecordset("Filename") = filename
objRecordset.Update
Next
objRecordset.Close
objConnection.Close
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:O70D6A1mEHA.2340@TK2MSFTNGP11.phx.gbl...
> Joshua C. Clark wrote:
>
>
> > "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote:
> >
> >> Sorry, CIM_DataFile doesn't support UNC (it might work if you
> >> map a drive letter to your UNC address first and use that one
> >> instead) ...
> >>
> >>
> > Hmm, any ideas how I could do that?
> Hi
>
> E.g. WSH's MapNetworkDrive method
>
>
> WSH 5.6 documentation (local help file) can be downloaded from
> here if you haven't got it already:
>
http://msdn.microsoft.com/downloads/list/webdev.asp
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
>
http://www.microsoft.com/technet/scriptcenter/default.mspx