Rename Source/Target Files in a Project

Hi

Passolo 2018 Team Edition question.

I have an automation question using C# and COM

I have a bunch of projects which contain files that live in folders with names containing for example 2025Q1.

When I perform a translation outsource at the moment, I manually open each project and change the names of the source folders and target folders to the new year/quarter. e.g., change the project folders from 2025Q1 to 2025Q2

I'd like to automate via a C# COM program but cannot seem to find the way to do it.

I've tried this code, but whilst it does not give an error, neither does it rename the output files in my project. when done.

Can this be done?
Best regards

Mark

            PassoloApp passolo = new PassoloApp();
            // Open the project
            passolo.Projects.Open(projectname, 36);
            sourcelists = passolo.ActiveProject.SourceLists;
            for (int i = 1; i <= sourcelists.Count; i++)
            {
                sourcelist = sourcelists.Item(i);
                if (sourcelist.SourceFile.Contains(oldquarter))
                {                // Update the source file path if needed
                    Console.Write("Rename {0} to ", sourcelist.SourceFile);
                    sourcelist.SourceFile = sourcelist.SourceFile.Replace(oldquarter, newquarter);
                    Console.WriteLine("{0} ", sourcelist.SourceFile);
                    sourcelist.Save();
                }
            }

emoji