Skip navigation
Currently Being Moderated

Save file without saveDialog?

Jul 31, 2012 5:49 AM

Tags: #save #dialog

Hi,

 

I'm trying to write some XML to a file through a script. The following code works fine:

 

var xmlStr = _newVnXML.toXMLString();

 

var myFile = File.saveDialog ("Save the XML file...");

 

myFile.open("W");

 

myFile.write(xmlStr);

 

myFile.close();

 

 

But I'm looking for a way to avoid needing the saveDialog section - I want to create a new file and save it entirely behind-the-scenes to a predetermined location (ie. by passing a path as a string).

 

Does anyone know how to do this?

Thanks

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points