Review the DelFile.ds referenced script files when scheduling inventory imports.

Note: This code is provided as a sample. It isn't a supported part of the SiteGenesis application.
 * Delete the file or directory.
 * @input SourceFileName  : String   the file to move
 * @input SourceDirectory :   the processing directory where the file is located
 * @input sampleLogger    : Object Sample logger	input for Sample logger
 * @output sampleLogger   : Object Sample logger	debug output for Sample logger
 * @output sampleError 	  : Object Sample error	error output for Sample logger

// Sample Logging ImportScript

function execute(pdict: PipelineDictionary): Number {
    // sample Logging var
    var _context: String = new Context("DelFile.ds");
    var _logger: Log = Log.getLogger(pdict);

    var sourceFileName: String = pdict.SourceFileName;
    var sourceDirectory: String = pdict.SourceDirectory;

    var sourceFile: File = new File(sourceDirectory, sourceFileName);

    if (!sourceFile.exists()) {
        _logger.error(_context, "Source file '" + + "' in path '" + sourceFile.path + "' cannot be found");
        return PIPELET_ERROR;
    }, "Delet file " + sourceFile);

    try {
    } catch (e) {
        var exception: sampleException = new sampleException(_context, "Failed delete file " + sourceFileName, e);
        _logger.error(_context, "Failed delete file " + sourceFileName + exception);
        pdict.sampleError = exception;

    return PIPELET_NEXT;
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.