<p>Programmatic solution of course...</p>

[{'answer_id': 17618, 'author': 'Ishmaeel', 'author_id': 227, 'author_profile': 'https://Stackoverflow.com/users/227', 'pm_score': 4, 'selected': False, 'text': '<p>You need to delve into unmanaged code. Here\'s a static class that I\'ve been using:</p>\n\n<pre><code>public static class Recycle\n{\n    private const int FO_DELETE = 3;\n    private const int FOF_ALLOWUNDO = 0x40;\n    private const int FOF_NOCONFIRMATION = 0x0010;\n\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]\n    public struct SHFILEOPSTRUCT\n    {\n        public IntPtr hwnd;\n        [MarshalAs(UnmanagedType.U4)]\n        public int wFunc;\n        public string pFrom;\n        public string pTo;\n        public short fFlags;\n        [MarshalAs(UnmanagedType.Bool)]\n        public bool fAnyOperationsAborted;\n        public IntPtr hNameMappings;\n        public string lpszProgressTitle;\n    }\n\n    [DllImport("shell32.dll", CharSet = CharSet.Auto)]\n    static extern int SHFileOperation(ref SHFILEOPSTRUCT FileOp);\n\n    public static void DeleteFileOperation(string filePath)\n    {\n        SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();\n        fileop.wFunc = FO_DELETE;\n        fileop.pFrom = filePath + \'\\0\' + \'\\0\';\n        fileop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION;\n\n        SHFileOperation(ref fileop);\n    }\n}\n</code></pre>\n\n<p>Addendum:</p>\n\n<ul>\n<li>Tsk tsk @ Jeff for "using Microsoft.VisualBasic" in C# code.</li>\n<li>Tsk tsk @ MS for putting all the goodies in VisualBasic namespace.</li>\n</ul>\n'}, {'answer_id': 17620, 'author': 'TK.', 'author_id': 1816, 'author_profile': 'https://Stackoverflow.com/users/1816', 'pm_score': 6, 'selected': True, 'text': '<p><a href="http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/" rel="noreferrer">http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/</a></p>\n\n<p>From above:</p>\n\n<pre><code>using Microsoft.VisualBasic;\n\nstring path = @"c:\\myfile.txt";\nFileIO.FileSystem.DeleteDirectory(path, \n    FileIO.UIOption.OnlyErrorDialogs, \n    RecycleOption.SendToRecycleBin);\n</code></pre>\n'}, {'answer_id': 17623, 'author': 'Zooba', 'author_id': 891, 'author_profile': 'https://Stackoverflow.com/users/891', 'pm_score': 4, 'selected': False, 'text': '<p>The best way I have found is to use the VB function <code>FileSystem.DeleteFile</code>.</p>\n\n<pre><code>Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file.FullName,\n    Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs,\n    Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin);\n</code></pre>\n\n<p>It requires adding <code>Microsoft.VisualBasic</code> as a reference, but this is part of the .NET framework and so isn\'t an extra dependency.</p>\n\n<p>Alternate solutions require a P/Invoke to <a href="http://msdn.microsoft.com/en-us/library/bb762164.aspx" rel="noreferrer" title="SHFileOperation">SHFileOperation</a>, as well as defining all the various structures/constants. Including <code>Microsoft.VisualBasic</code> is much neater by comparison.</p>\n'}]
['https://Stackoverflow.com/questions/17612', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/580/']