Using powershell to merge two folders and rename files based on source folder
问题 I have a set of files like this: 2015_09_22 |____ foo |____ common.ext |____ common.1.ext |____ common.2.ext |____ common.3.ext |____ bar |____ common.ext |____ common.1.ext |____ common.2.ext I want to merge them into a structure like this, using the source folder name as a string to prepend to the filename: 2015_09_22 |____ foo_common.ext |____ foo_common.1.ext |____ foo_common.2.ext |____ foo_common.3.ext |____ bar_common.ext |____ bar_common.1.ext |____ bar_common.2.ext The format of