• Hi,

    You don't necessarily need an activeX script in the Agent job. You can do it by using the xp_fileexists extended proc in T-SQL.

    CREATE TABLE #exists (file_exist BIT, is_dir BIT, parent_dir BIT)

    INSERT INTO #exists

    execute master..XP_FILEEXIST '\\MachineName\directory\file.txt'

    IF EXISTS (SELECT * FROM #exists WHERE file_exist = 1)

    RAISERROR('File Exists', 10, 1) -- Non-fatal error as notification

    ELSE

    RAISERROR ('File Does Not Exist', 16, 1) -- Fatal error failing step

    You can then have the step go to step X on pass and step Y on failure.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]