Need help with Application.FileSearch change

T

Turf

If someone could help with the code that I am posting below I would
greatly appreciate it. I am using Access 2007 and this feature no
longer is supported


Turf


Private Sub File_Locations1()
Dim Location As Recordset
Dim i As Integer
Dim count As Integer
Dim NewName As Variant
Dim NewPath As Variant
Dim WkSpace As Workspace
Set WkSpace = DBEngine.Workspaces(0)
Set Location = CurrentDb.OpenRecordset("Files", dbOpenTable)


With Application.FileSearch

.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Aberd\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Elma\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Hoqui\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\McCle\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Monte\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Shelt\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Bend\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Chemu\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Cresc\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Gilch\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Lapin\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Madra\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Metol\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Powel\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Prine\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Redmo\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Sunri\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Belli\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Acme\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Blain\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Demin\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Evers\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Fernd\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Lawre\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Lynde\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Nooks\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Sumas\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Allyn\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Breme\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Belfa\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Chico\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Gorst\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Keypo\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Manch\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Porto\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Pouls\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Silve\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Sunny\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Kenn\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Burba\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Finle\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Pasco\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Pater\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Richl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Westr\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Longv\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Castl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Kalam\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Kelso\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Woodl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Moun\Mount\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Moun\Anaco\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
End With
MsgBox "File Locations (1) is complete."



End Sub
 
D

Douglas J. Steele

Not sure exactly what you're trying to do (there's far too much code there
to have to wade through to determine what it's doing!), but see whether
http://my.advisor.com/doc/16279 helps.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Turf said:
If someone could help with the code that I am posting below I would
greatly appreciate it. I am using Access 2007 and this feature no
longer is supported


Turf


Private Sub File_Locations1()
Dim Location As Recordset
Dim i As Integer
Dim count As Integer
Dim NewName As Variant
Dim NewPath As Variant
Dim WkSpace As Workspace
Set WkSpace = DBEngine.Workspaces(0)
Set Location = CurrentDb.OpenRecordset("Files", dbOpenTable)


With Application.FileSearch

.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Aberd\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Elma\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Hoqui\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\McCle\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Monte\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Aber\Shelt\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Bend\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Chemu\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Cresc\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Gilch\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Lapin\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Madra\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Metol\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Powel\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Prine\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Redmo\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bend\Sunri\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Belli\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Acme\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Blain\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Demin\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Evers\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Fernd\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Lawre\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Lynde\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Nooks\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Bell\Sumas\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Allyn\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Breme\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Belfa\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Chico\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Gorst\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Keypo\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Manch\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Porto\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Pouls\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Silve\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Brem\Sunny\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Kenn\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Burba\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Finle\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Pasco\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Pater\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Richl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Kenn\Westr\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Longv\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Castl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Kalam\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Kelso\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Long\Woodl\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Moun\Mount\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
.NewSearch
.lookin = "G:\Shared\JDE\JDE_docs\Moun\Anaco\SL\"
' .FileName = "*"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If .Execute > 0 Then
DoCmd.Hourglass True
For i = 1 To .FoundFiles.count
NewName = ""
NewPath = ""
For count = 1 To Len(.FoundFiles(i))
If Mid(.FoundFiles(i), Len(.FoundFiles(i)) - count +
1, 1) <> "\" Then
NewName = Mid(.FoundFiles(i), Len(.FoundFiles(i))
- count + 1, 1) + NewName
Else
Exit For
End If
Next count
NewPath = Mid(.FoundFiles(i), 4, Len(.FoundFiles(i)) -
count - 3)
WkSpace.BeginTrans
Location.AddNew
If Mid(NewName, 8, 1) = "." Then
Location![ROUTE ACCT] = Left(NewName, 7)
Else
Location![ROUTE ACCT] = Left(NewName, 8)
End If
Location![PATH] = NewPath
Location![FileName] = NewName
Location.Update
WkSpace.CommitTrans
Next i
DoCmd.Hourglass False
DoCmd.OpenQuery ("Update File Location")
End If
End With
MsgBox "File Locations (1) is complete."



End Sub
 
D

David W. Fenton

:
If someone could help with the code that I am posting below I
would greatly appreciate it. I am using Access 2007 and this
feature no longer is supported

I wrote a class module replacement for the FileSearch object. It's
available here:

http://dfenton.com/DFA/download/Access/FileSearch.html

I'm about to do an update, but have some other things to finish
before I can upload it. If you need to search by Last Modified date,
you'll have to wait for my update, but I don't see that in your
code.

After you import the class module, your code should work with the
FileSearch class module by replacing this:

With Application.FileSearch

....with this:

Dim clsFileSearch As New clFileSearch
With clsFileSearch

....and that's all you have to do!

I've tried to implement it as close to the FileSearch object as
possible, but there are several things that are not supported and
some things may not work precisely the same as the FileSearch
object, and the file type enumerations may have some
inconsistencies. You can read the cited web page above for a full
explanation of what's implemented and what's not, and what is in the
foggy gray area where I can't say for certain if it works exactly
the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top