Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

save files silently

Help
Ed_M
2013-07-10
2013-07-10
  • Ed_M
    Ed_M
    2013-07-10

    I'm trying to convert files from txt to rtf using the NPPExport plugin (maybe this question belongs there?).

    import os
    for filename in os.listdir('d:\mydir'):
    if filename.endswith(".txt"):
    notepad.open(filename)
    os.chdir('d:\mydir')
    notepad.runPluginCommand("NppExport","Export to RTF")

    This works. It opens all the txt files in the directory and tries to save them as rtf files. but it brings up the file dialog for each one and you have to press save. Is there a way to suppress the dialog and just have it save?

    thanks in advance.