<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`FileManager`](FileManager) › [`getNewFileParent`](FileManager/getNewFileParent) ## FileManager.getNewFileParent() method Gets the folder that new files should be saved to, given the user's preferences. **Signature:** ```typescript getNewFileParent(sourcePath: string, newFilePath?: string): TFolder; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>sourcePath</code> | <code>string</code> | The path to the current open/focused file, used when the user wants new files to be created 'in the same folder'. Use an empty string if there is no active file. | | <code>newFilePath</code> | <code>string</code> | <p>_(Optional)_ The path to the file that will be newly created, used to infer what settings to use based on the path's extension.</p><p> 1.1.13</p> | **Returns:** [`TFolder`](TFolder)