Author Topic: Trying to automate removing certain files from a project  (Read 381 times)

pmsteinm

  • Senior Community Member
  • Posts: 116
  • Hero Points: 3
Trying to automate removing certain files from a project
« on: August 09, 2024, 07:01:00 PM »
I am using SE in Windows, but my files are in WSL2. Getting to them via \\wsl.localhost works fine except for symbolic links. I really don't care about those files and want to remove them from my project. I started writing a macro based on some old thread from 2008, but I'm guessing things have changed.

I do this:

  retVal = _ProjectRemove_File(_ProjectHandle(_project_name), fileName);

Which on its own doesn't seem to work. But if I add this to the macro:

project_add_file('\\wsl.localhost\Ubuntu\home\muuserid\somefile');

Then the remove command works. I assume my first function call does something but those changes don't actually get saved to the project file (since if I call the command twice on the same file I get a return code the second time indicating nothing changed). Can anyone tell me what function I need to call to save the project file changes?
Modify message