TITAN CMS - Titan File Import Task

Use utility to import file for large sections of files such as a background scheduler job.

Overview

Use utility to import file for large sections of files such as a background scheduler job.  You basically specify a root folder in the file pile, and tell it to import a specific folder of files.  The job will run and mimic the exact folder/file structure of the source files in the destination/root folder in the file pile that you specified.  For example, if you have a source folder that contains two subfolders, X and Y, and you tell the import job that you want to import that source into folder A of the file pile, once the job is done, you will have an X and Y folder in the file pile under A, with all of the respective files.  The caveat here is that the files need to be on the app server – they can’t be imported from your local machine. 

Steps

Here are some basic instructions on how to set up the task:

  1. Go to Titan Admin
  2. In the left nav, expand the “Scheduled Jobs” node
  3. Click on the “Import Files Task” node.
  4. Hit the “New” button from the global toolbar and create a task by specifying a name and hitting ok.
  5. In the right pane, you will be presented with some configuration items.
  6. In the “XML Configuration data” section, you will need to modify the data appropriately.  Below is a rundown of each element and what it does.

<ConfigArgs>

<InterfileDelay>5</InterfileDelay>

<SourceFileDir>C:\MKEV3ImageLibrary\ImageLibrary</SourceFileDir>

<DestFileDir>C:\Inetpub\wwwroot\Titan\ImageLibrary\ImageLibrary</DestFileDir>

<RootDocID>25007</RootDocID>

<DeleteOldVersion>1</DeleteOldVersion>

<DeleteSource>0</DeleteSource>

<HideMissingFiles>0</HideMissingFiles>

</ConfigArgs>  

InterfileDelay – This is the sleep time between each file that is uploaded.  It is basically an effort to avoid hogging CPU and keep the system from making a large number of web requests to upload files in a short period of time.

SourceFileDir – This should be on the app server (A.K.A., the server where the background service is installed).  All file paths in this config section are relative to the App server, which is where the import files code runs.  This is really an arbitrary value.  Just drop your files onto the app server, and set this value to the root folder the files are in.

DestFileDir – This is where the files will be place once they are uploaded.  This should be same as the upload path of the file pile you’re uploading to.  To confirm what this value is, go to the “File Piles” node in Titan Admin.  Click on the file pile you’re uploading to, and copy the “Upload Path” property from the right pane.  

RootDocID – This is the DocID of the folder you want to import the files into.  All of the files/folders will be created as children of this root DocID.  You can find the DocID of the folder by hovering your mouse over it.  Let’s say I wanted to upload to “ImageLibrary>SiteImages>Shared” folder in the workstation.  Navigate to that folder in the workstation, and hover your mouse over it.  The number in brackets is the DocID that you should use for this field.

DeleteOldversion – 1 equals true.  If you are replacing an existing file, this will dictate whether or not the previous version will be deleted from the server.

DeleteSource – If set to 1, the files in the <SourceFileDir> field will be deleted from their original location after being imported into the system.  If you have no use for the files in the SourceFile directory after they are imported, I would set this field to 1.

HideMIssingFiles - This will hide files in the workstation if they exist in the location specified by the <RootDocID> field, but are not present in the set of files being uploaded.  For example, lets say you had a file named OldFile.txt in the “Shared” directory you were uploading to.  However, you did not import a file named OldFile.txt as part of the import files task.  This OldFile.txt would then be set to hidden (in the properties tab for that file).  As with the other fields, 1 equals true and 0 equals false.  In general, I would leave this at 0.  The main reason to use this would be if you are importing multiple times to the same folder, and want to create a mirror image of the imported files/folders every time you run the task.

 

 

Prerequisites
 

Log in to the workstation:

  1. Enter your TitanCMS URL in a browser address bar.
  2. The Titan Login screen will appear.
  3. Enter your User Name in the User Name field.
  4. Enter your Password in the Password field.
  5. Click Log In.  The TitanCMS application should open to the Titan Web Content Management Module.
Titan CMS Training

Check out upcoming Titan CMS Training Classes
 

Learn at Northwoods 

Workshops
 

Titan CMS Support

(414) 914-9200
Submit Questions
 

Northwoods Web Solutions

p: (414) 914-9100