I have a folder and in that I have multiple sub-folders , each containing a default.xml file. I need to rename all the default.xml within all these sub-folders with the same name as that of the sub-folder.
So that my default.xml will become sub-folder_name.xml.
Lets say My main folder is \sites\ASDF, within that I have 10 sub-folders -> ABC-123, DEF-231, ......like this and I want to rename the default.xml within all these sub-folder to ABC-123.xml, DEF-231.xml. It should be done by using Powershell. Any ideas?
rename-item –path "d:\a2\a11\SIT-E1236\default.xml" –newname d:\a2\a11\SIT-E1236\SIT-E1236.xml
rename-item –path "d:\a2\a11\SIT-E1238\default.xml" –newname d:\a2\a11\SIT-E1236\SIT-E1238.xml
This using some loop?
Also how can I edit some xml files together to make some particular changes on the xml nodes?