CopyFiles using IFileOperation (C++) -


I want to copy many files using IFileOperation. The copy of a file is not a problem like this example:

My problem is that I have no way to copy many files like * .txt I use SHCreateShellItemArrayFromIDLists as this script Have tried:

  IShellItem * psiTo = NULL; HRESULT hr = SHCreateItemFromParsingName (CST arget, NULL, IID_PPV_ARGS (and psiTo)); LPCIIDIDILITIILIDPIILFIfile = ILCraftPath (CSSOSRS); UINT calculation = size (pedal); Ishel Itamayre * psiafiles = NULL; Hour = SHCreateShellItemArrayFromIDLists (counting, and pidlFiles, and psiaFiles); Hr = pfo- & gt; Copyimes (psiaFiles, psiTo); Hr = pfo- & gt; Display operation ();   

Use SHCreateShellItemArray in another way, such as:

  LPCITEMIDLIST pidlParent = ILCreateFromPath (_T ("C: \\")); LPCITEMIDLIST pidlChild = ILCreateFromPath (_T ("C: \\ Temp \\ *. Txt")); HRESULT hr = SHCreateShellItemArray (Pedalperant, Faucet, 1, & Pidil Child, and PsfaFile); Hr = pfo- & gt; Copyimes (psiaFiles, psiTo); Hr = pfo- & gt; Display operation ();   

I tried differently but almost got me E_INVALIDIDARG or ERROR_PATH_NOT_FOUND. What is wrong?

ILTR does not take wildcards because it is a single PIDLIST_ABSOLUTE returns

The easiest solution is to manually file FindFirstFile (* .txt) , call CopyItem each result Then, and then call PerformOperations Once Upon End

As always, older Windows functions are better SHFileOperation <1081> Simple and easy to boot Has: It's straight wildcaster E supports.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -