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
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