FOMM C# script function to remove a file?

Post » Tue Aug 30, 2011 11:56 am

I'm currently writing an install/uninstall script for a mod. It's going to be a FOMM/BAIN-ready archive. Because of the unusual package structure I heavily make use of the function 'CopyDataFile(String1, String 2)'. Problem here is uninstalling. Is there any function to remove a file from the user's data folder? I've looked for a FOMM documentation on functions, but except for the fomm.chm, which didn't help in that case, I was not able to find one.

Thanks in advance.
User avatar
Vahpie
 
Posts: 3447
Joined: Sat Aug 26, 2006 5:07 pm

Post » Tue Aug 30, 2011 8:45 am

FOMM can use the entire C# language, correct? Haven't looked at it in too much depth. But if it can:

Using System.IO;File.Copy(SourceFile, DestFile);File.Delete([Filename]);

User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Mon Aug 29, 2011 9:26 pm

Thanks, I could use that, but how would I detect where the user has Steam (and therefore New Vegas) installed? I'd prefer a FOMM function, though, so the question in the OP is still valid.
User avatar
willow
 
Posts: 3414
Joined: Wed Jul 26, 2006 9:43 pm

Post » Tue Aug 30, 2011 1:46 pm

Case solved. I revised my installation script. It works automatically now. Untill I screw something up again.
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am


Return to Fallout: New Vegas