local loConnection, loResources, loResource, llValid loConnection = GetObject("WinNT://SKYAPPS/LanmanServer") && SKYAPPS is our server, you should change this to yours loResources = loConnection.Resources() create cursor C_Resources ; ( ; PK I Autoinc , ; Name C(240) , ; User C(64) , ; Path C(240) , ; ADsPath C(240) , ; GUID C(64) , ; Schema C(240) , ; Locks I ; ) For Each loResource in loResources with loResource try lcPath = .Path llValid = .t. catch llValid = .f. endtry if llValid wait window 'Adding resource: ' + .Path nowait insert into C_Resources ; ( ; User , ; Name , ; Path , ; ADsPath , ; GUID , ; Schema , ; Locks ; ) ; values ; ( ; .User , ; .Name , ; .Path , ; .ADsPath , ; .GUID , ; .Schema , ; .LockCount ; ) endif endwith endfor wait window 'Creating indexes...' nowait index on PK tag PK index on Path tag Path index on User tag User wait clear