If your goal is a fantastic copy dialog, SHFileOperation , the Windows API function provides this. The pywin32 package has a python binding for it, ctypes is also an option (for example, "SHFileOperation font types").
Here is my (very slightly tested) example using pywin32:
import os.path from win32com.shell import shell, shellcon def win32_shellcopy(src, dest): """ Copy files and directories using Windows shell. :param src: Path or a list of paths to copy. Filename portion of a path (but not directory portion) can contain wildcards ``*`` and ``?``. :param dst: destination directory. :returns: ``True`` if the operation completed successfully, ``False`` if it was aborted by user (completed partially). :raises: ``WindowsError`` if anything went wrong. Typically, when source file was not found. .. seealso: `SHFileperation on MSDN <http://msdn.microsoft.com/en-us/library/windows/desktop/bb762164(v=vs.85).aspx>` """ if isinstance(src, basestring):
You can also perform the same copy operation in silent mode (without dialogue, no confirmation, pop-ups with an error) if you set the flags above shellcon.FOF_SILENT | shellcon.FOF_NOCONFIRMATION | shellcon.FOF_NOERRORUI | shellcon.FOF_NOCONFIRMMKDIR. shellcon.FOF_SILENT | shellcon.FOF_NOCONFIRMATION | shellcon.FOF_NOERRORUI | shellcon.FOF_NOCONFIRMMKDIR. See SHFILEOPSTRUCT for details.
Nikita Nemkin Jun 01 '13 at 9:18 2013-06-01 09:18
source share