• From googling that error - that seems to be a permissions error (outside of SQL Server). Meaning - more likely than not the SQL Server Service account OR the SQL Agent proxy account (which if I understand xp_cmdshell correctly, are the two possibilities for the external security context under which this is running) don't have permissions to the root directory.

    Actually - if you're running this on a "real server", and not a workstation - you might care to try testing to just about anywhere other than the root of a drive (root directories tend to get locked down more stringently than subs).

    Edit: 2005 is a little security-wise. Take this on:

    xp_cmdshell Proxy Account

    When it is called by a user that is not a member of the sysadmin fixed server role, xp_cmdshell connects to Windows by using the account name and password stored in the credential named ##xp_cmdshell_proxy_account##. If this proxy credential does not exist, xp_cmdshell will fail.

    The proxy account credential can be created by executing sp_xp_cmdshell_proxy_account. As arguments, this stored procedure takes a Windows user name and password. For example, the following command creates a proxy credential for Windows domain user SHIPPING\KobeR that has the Windows password sdfh%dkc93vcMt0.

    Copy CodeEXEC sp_xp_cmdshell_proxy_account 'SHIPPING\KobeR','sdfh%dkc93vcMt0'

    For more information, see sp_xp_cmdshell_proxy_account (Transact-SQL).

    So - that proxy account or the SQL Server servie account, if I'm understanding that right.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?