Another answer is correct, but the file will exist in your AND folder in the "drive" folder (root folder).
To avoid this, just remove it from there!
code:
var doc = DocumentApp.create('Document Name'), docFile = DriveApp.getFileById( doc.getId() ); DriveApp.getFolderById('0B3°°°°°°°1lXWkk').addFile( docFile ); DriveApp.getRootFolder().removeFile(docFile);
source share