Domanda

I have 2 folders:

m:\folder1

and

m:\folder2

I would like to merge folder2 with folder1 so that only folder1 exists.

I tried using SHFileOperation

With SHFileOp
    .wFunc = FO_FUNC
    .pFrom = "m:\folder2"
    .pTo = "m:\folder1"
    .fFlags = FO_MOVE
End With

...but that put m:\folder2 into m:\folder1\folder2. But that was not what I wanted.

Is SHFileOperation the valid approach to do that and if yes, how should that be done?

Thank you!

È stato utile?

Soluzione

To move all the files in the folder, you need:

.pFrom = "m:\folder2\*.*"
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top