• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1567
  • Last Modified:

Incorrect Syntax with xp_delete_file

What's wrong with this command? I get Incorrect Syntax near 'txt'. The odd part is that this was generated my the maintenance plan wizard....

EXECUTE master.dbo.xp_delete_file 1,N'''',N''txt'',N''2008-01-12T04:01:38''
0
advlgx
Asked:
advlgx
  • 2
1 Solution
 
advlgxAuthor Commented:
I also tried:
EXECUTE master.dbo.xp_delete_file 1,N'',N'txt',N'2008-01-12T04:01:38'

and get an Invalid Parameter error
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you have some quotes too much:
EXECUTE master.dbo.xp_delete_file 1,N'',N'txt',N'2008-01-12T04:01:38'

Open in new window

0
 
advlgxAuthor Commented:
Got it, the second parameter was not filled in for some reason. Added C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now