If you know the analysis frame length (i.e., the number of partials), you could send a message to the file name to get its duration in frames, for example (if the frame length were 512):
'alien threat h.spc' fileDuration s samp / 512
would give you the duration in seconds, converted the duration in samples and then divided by the frame length to get the number of frames.
If you are doing the spectrum modifications live (for example with SpectrumModifier), you could go to the Action menu and select Batch processing... to perform that chain of processing on a folder-full of spectrum files. Unfortunately, there's no equivalent for the processing that you perform by hand in the Spectrum editor. Maybe you can figure out a way to do some of the modifications you like using the SpectrumModifier?