file:import
Imports a file from an account to your Account Customization Project.
You cannot import files from a SuiteApp.
If you run the command in non-interactive mode, the file is overwritten if it already exists in your project.
Syntax
file:import <--paths FileCabinetPath1> [--excludeproperties]
Options
Option |
Required / Optional |
Description |
---|---|---|
--excludeproperties |
Optional |
Excludes the file and folder properties specified in your account. If you specify this option, the .attributes folder is neither created nor updated, if applicable. For more information about the .attributes folder, see Modifying SuiteCloud Project File and Folder Attributes in an XML Definition. |
-i or --interactive |
Optional |
Runs the command in interactive mode. |
--paths |
Required |
Specifies the FileCabinet path of the file to import. For example, "/SuiteScripts". You can only import one file at a time in the non-interactive mode.
Important:
Wildcards are not allowed. |
-h or --help |
Optional |
Prints the help for this command. |
Interactive Example
The following command imports all the files from an account into the current project using the interactive mode:
suitecloud file:import -i
Before you run the command, the following questions are prompted:
Select the path where you want to import the files. > \SuiteScripts \SuiteScript\MyProject \SuiteScript\MyProject\Subfolder [Restricted]
Select the files you want to import to your project. (*) All ( ) \SuiteScripts\SuiteCallPortlet.js ( ) \SuiteScripts\SuiteCallSuitelet.js ( ) \SuiteScripts\Suitelet.js ( ) \SuiteScripts\Suitelet1.js
Do you want to exclude all file properties within the .attributes folder? > Yes No
All the objects in the project will be overwritten with the objects from the account. Do you want to continue? > Yes No
Non-interactive Example
The following command imports a file from an account into the current project using the non-interactive mode:
suitecloud file:import --paths "/SuiteScripts/test.js"
Output Example
When you run the command, it produces an output that is similar to the following:
The following files were imported:
/SuiteScripts/2x_UE_CustomerDeposit_UpdateDepositAmountOnOrder.js