views:

102

answers:

1

Does SHFileOperation support to move and rename files at the same time?

I'v got a set of files : c:\ f1.bmp f2.bmp f3.bmp f4.bmp

I want to move each to new folder, and rename them: d:\ b1.bmp b2.bmp b3.bmp b4.bmp

Can I use SHFileOperation? and just do it once? Many thanks!

A: 

SHEFILEOPSTRUCT msdn

You can use the FOF_MULTIDESTFILES as stated in the msdn article: "The pTo member specifies multiple destination files (one for each source file in pFrom) rather than one directory where all source files are to be deposited." Perform a FO_MOVE operation with this flag.

yarduddles
I seeMany Thanks!