'This script changes the location of files attached to use cases. It 'finds paths that start with cOldLoc$ and replaces that part of the 'path with cNewLoc$. Be aware that Rose won't redraw the paths in the 'browser view until you save and re-open the model. Const cNewLoc$ = "C:\My Documents\" Const cOldLoc$ = "C:\myjava\" 'returns whatever is after inTopPath in inFullPath Function ExtractPathBelow(inFullPath As String, inTopPath As String) As String ExtractPathBelow = "" leftSide$ = Left(inFullPath, Len(inTopPath)) If leftSide$ = inTopPath Then ExtractPathBelow = Right(inFullPath, Len(inFullPath) - Len(inTopPath)) End If End Function Sub RemapExtern (inCase As UseCase) Dim externs As ExternalDocumentCollection Dim anExtern As ExternalDocument Set externs = inCase.ExternalDocuments For i = 1 To externs.Count Set anExtern = externs.GetAt(i) If anExtern.IsURL() Then GoTo SkipThisExtern End If theBottom$ = ExtractPathBelow(anExtern.Path, cOldLoc$) If theBottom <> "" Then Print inCase.name anExtern.Path = cNewLoc$ + theBottom$ End If SkipThisExtern: Next i End Sub Sub Main Dim allCases As UseCaseCollection Dim aCase As UseCase Viewport.Open 'alternative: 'Set allCases = RoseApp.CurrentModel.GetSelectedUseCases() Set allCases = RoseApp.CurrentModel.GetAllUseCases() For i = 1 To allCases.Count Set aCase = allCases.GetAt(i) RemapExtern aCase Next i End Sub