file:import

Imports a file from an account to your Account Customization Project.

Note:

You can't import files from a SuiteApp.

Tip:

If you run the command in non-interactive mode, the file gets overwritten if it already exists in your project.

Syntax

            suitecloud file:import <--paths FileCabinetPath1> [--excludeproperties] 

          

Options

Option

Required / Optional

Description

--excludeproperties

Optional

Excludes the file and folder properties from your account. If you specify this option, the .attributes folder isn't created or updated. 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 you want to import. For example, "/SuiteScripts". You can only import one file at a time in non-interactive mode.

Important:

Wildcards aren't allowed.

-h or --help

Optional

Prints the help for this command.

Interactive Example

Here's a command that imports all the files from an account into the current project using interactive mode:

            suitecloud file:import -i 

          

Before you run the command, you'll be prompted with these questions:

            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

Here's a command that imports a file from an account into the current project using 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 

          

Related Topics

General Notices