fileloader utility
The fileloader utility is not provided with WebSphere Commerce Developer.
The fileloader utility loads managed files into a WebSphere Commerce database. Once the files are loaded into the database, the ManagedFileUpdateEAR scheduled job copies the files from the database to the WebSphere Commerce EAR file.
Before running this utility, ensure that you have completed the required configuration tasks:
(AIX)(Linux)(Solaris) Run this utility as the non-root WebSphere Commerce user ID. Do not run this command as root.
Utility command
The fileloader utility has the following file name:
Parameter values
Unless indicated, all of the parameters listed are required.
- -dbname
- (AIX)(Linux)(Solaris)(Windows) Name of the target database
- (i5/OS) This is the database name as displayed in the relational database directory (WRKRDBDIRE)
- -dbuser
- (AIX)(Linux)(Solaris)(Windows)Name of the user connecting to the database
(i5/OS) This is usually the same as the instance user name
- -dbpwd
- Password for the user connecting to the database
- -inputpath
- The full path of the file you want to load or the full path to the directory containing the files you want to load.
If the input path you specify is a directory, all of the files in the directory will be loaded as managed files.
If the input path you specify is the path to a ZIP file, you should specify the -iszipfile parameter. If you do not specify the -iszipfile parameter, the ZIP file will be treated be treated as a single managed file.
- -serverpath
- The relative path path on the server where you want the managed files to go when the ManagedFileUpdateEAR scheduled job copies the file from the database to the WebSphere Commerce EAR file.
Paths specified by this parameter are relative to the WC_eardir/Stores.war directory.
If you are loading files to use as catalog or marketing attachments, the server path must start with the following path: storedir/Attachment. Files outside of the storedir/Attachment directory are not recognized by the catalog and marketing attachments tools.
For example, if you specify storedir/Attachment/myfiles/loaded_files as the -serverpath, your managed files would be copied to the following directory:
If you are loading a ZIP that contains path information for multiple flies and you set -iszipfile to true, the path information is maintained relative to the path you specify as the -serverpath.
For example, if your ZIP files contains a file called image.gif, the path information stored in the ZIP file for the image is extra_files/special_images, and you specify myfiles/loaded_files as the -serverpath, the full path to image.gif will be:
- -iszipfile
- (Optional) If the file you loading with the fileloader utility is a ZIP file, set this parameter accordingly.
If you do not specify this parameter, the fileloader utility runs as if -iszipfile is set to false.
This parameter accepts the following values:
- true
- If you set the iszipfile parameter to true, the fileloader utility will uncompress the ZIP file and load each file in the ZIP file into the database as a separate managed file. The paths of the files in the ZIP file will be maintained.
- false
- If you set the iszipfile parameter to false, the fileloader utility will treat the ZIP file as a single managed file. The ZIP file will not be uncompressed.
- -workspcname
- This parameter does not apply to WebSphere Commerce - Express
This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server. (Optional) The workspace code which is the system generated identifier for the workspace, not the name assigned to the workspace by the Workspace Manager. Specify this parameter if you want the fileloader utility to load the managed files into a workspace and not the production-ready data.
If you specify the -workspace parameter, specify the following parameters:
If you are using the fileloader utility on an authoring server and you do not specify the workspcname parameter, the managed files are loaded into the production-ready data.
- -taskgrp
- This parameter does not apply to WebSphere Commerce - Express
This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server. The task group code which is the system generated identifier for the task groups, not the name assigned to the task group by the Workspace Manager.
- -task
- This parameter does not apply to WebSphere Commerce - Express
This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server. The task code which the system generated identifier for the task, not the name assigned to the task by the Workspace Manager.
- -uploadtimestamp
- (Optional) This is the date and time at which the managed file has been loaded into the database. The ManagedFileUpdateEAR scheduled job uses the managed file time stamp as one of its criteria for copying files from the WebSphere Commerce database to the WebSphere Commerce EAR file.
If you do not specify this parameter, the current time stamp is used.
The format of the time stamp must be:
yyyy.mm.dd_hh:mm:ss where the variables are:
- yyyy
- The year for the time stamp as a 4-digit number.
- mm
- The month for the time stamp as a 2-digit number.
- dd
- The day of the month for the time stamp as a 2-digit number.
- hh
- The hour for the time stamp as a 2-digit number. Specify the number according to the 24-hour clock. For example, 11 p.m. would be 23.
- mm
- The minutes for the time stamp as a 2-digit number in the range 00-59.
- ss
- The seconds for the time stamp as a 2-digit number in the range 00-59.
- -idpoolsize
- (Optional) This is the number of identifiers to be reserved for the managed files you are loading. For each file you are loading using the fileloader utility, reserve 1 identifier. For example, if you are loading a ZIP file containing 700 managed files, you should set the idpoolsize to 700.
If you do not set this parameter, the number of identifiers is set to 500.
- -customizer
- Name of the customizer property file to be used for your WebSphere Commerce database. When specifying the customizer property file with this parameter, omit the ".properties" file extension.
Specify one of the following customizer values:
- (AIX)(Linux)(Solaris)(Windows) (Not required) Do not specify this parameter if you are using DB2 Universal Database on AIX, Linux, Solaris, or Windows operating systems.
- (i5/OS) (Required) Specify one of the following customizer files:
- FileLoaderISeriesCustomizer
- Specify this customizer value if you are using the native i5/OS JDBC driver.
When you specify this value, the fileloader utility uses the values specified in the following file:
WC_installdir/properties/FileLoaderISeriesCustomizer.properties
- FileLoaderToolboxCustomizer
- Specify this customizer value if you are using the IBM Toolbox for Java JDBC driver.
When you specify this value, the fileloader utility uses the values specified in the following file:
WC_installdir/properties/FileLoaderToolboxCustomizer.properties
If you specify this customizer value, specify the hostname as the -dbname parameter. The following is an example of invoking the fileloader.sh script:
./fileloader.sh -dbname MY.HOSTNAME.COM -dbuser instance -dbpwd mypass -inputpath ./image.gif -serverpath Stores.war/Attachments -customizer FileLoaderToolboxCustomizer- (Required) FileLoaderDB2390Customizer
When you specify this value, the fileloader utility uses the values specified in the following file:
WC_installdir/properties/FileLoaderDB2390Customizer.properties
- (Required) FileLoaderOracleCustomizer
When you specify this value, the fileloader utility uses the values specified in the following file:
WC_installdir/properties/FileLoaderOracleCustomizer.properties
Related concepts
Related tasks
Related reference