Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to manage get-child item, then foreach child move the item some where

$
0
0

Hi,

I have a directory structure like the following:

RootFolder

-> SubFolder1

 * page1.txt

* page2.txt

* thumb1.jpg

* thumb2.jpg

-> SubFolder2

* page1.txt

* thumb1.jpg

Now, what I want to achieve is like I should get a directory structure like the following:

RootFolder 

-> SubFolder1

*SubFolder1txtFiles

-page1.txt

-page2.txt

*SubFolder1jpgFiles

-thumb1.jpg

-thumb2.jpg

-> SubFolder2

*SubFolder2txtFiles

-page1.txt

*SubFolder2jpgFiles

-thumb1.jpg

These SubFolders may range from SubFolder1..n, same is the case for the number of files in them as well. Moreover I want the new child folder name affixed with the name of the Parent folder.

Thanks in advance,

-Aravind


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>