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

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

I'm sorry jrv. Consider me as a newbie to Powershell. Didn't get a complete clue how to solve this problem. That's why I didn't post the script. I've tried gci and move-item and rename-item cmdlets. But still not able to re-direct the categorized files to
the corresponding subFolders.
Just a sample what I tried out :
Get-ChildItem E:\RootFolder\ -Recurse -Include *.txt |
ForEach-Object{ $name = $_.Name
            New-Item -Path "E:\RootFolder\$name" -ItemType Directory
        Move-Item E:\DemoSessions\ComputerScience\Converted\$_\*.txt -Destination E:\RootFolder\$name\
Thanks.

Similar Messages

  • How do I get my registration benefit?  None of the items shown are selectable

    I have just upgraded my copy of Adobe Master collection 4 to Master Collection 5.5. on a 64-bit PC running Windows 7
    After starting up Adobe Photoshop I went to Help/Complete Update Adobe Profile where I was told "Claim your exclusive benefit today". Choices were offered and I clicked on the free font. All it did was display information about the font.  There is nothing on that page that says "Give me it now"!
    I copleted the registration hoping there would  be a link at the end of that. There wasn't.
    I found others having a similar problem on the forums "Where's the free gift?" but the solution (go to Edit your Adobe Account information/Personal Info) doesn't work.
    How can I get my "exclusive benefit"?
    On top of an installation failure which told me I'd have to reinstall (which Adobe Analyzer tells me is because my new laptop apparently has a more recent version of Flash Player than CS5.5 and isn't anything to worry about) and then a check for updates that revealed the package delivered by Adobe just yesterday actually requires nearly 1GB to be downloaded, this doesn't give a great initial impression of quality. :-(

    Irascian I apologize for the inconvenience.  We are currently experiencing difficulties with customers claiming their benefits online.  I would recommend reviewing and following the steps in Complimentary benefit claim document.

  • How do I get a section break/page break when the item is greyed out?

    I've created an A4 document in word processing mode, with four identical A6 text boxes covering the entire page. Then I've created a second page with four more A6 text boxes so I can print a postcard on both sides of the card. Trouble is, Pages has made two extra text pages that I don't want, the first is linked to Pages 1 and 2, and the second is separate. I can't create a section break or page break because the command is greyed out, so I can't delete page 3. When I try and delete page 4, which is a stand alone page, it also deletes pages 2,3 and 4, leaving me with just page 1!
    I don't have any problem with page breaks or section breaks in an ordinary A4 document with just one text box on a page, but I often want to create multiple text boxes and when I do I have always had this problem, ever since Pages was first introduced. Can anyone tell me what I'm doing wrong, please?

    Thank you, Yvan, but I've tried that. Firstly, I unchecked the headers and footers tick box in the Inspector because I want the postcards to be exactly A6 size, that is, one quarter of A4. I've tried making the lower two text boxes slightly smaller (which I don't really want to do, because I want them A6 size) but I still can't get the insertion point to appear below the text box – it stays resolutely in the next page and won't go back up to the previous page. Any further ideas? Thank you.

  • How do I get my deleted emails to go to the deleted items in Outlook and not the archived folder?

    How do I get my deleted emails to go to the deleted items in Outlook and not the archived folder?

    Who is the email account provider?
    With an Apple iCloud account, there is a preference setting with the account settings on the iPhone to archive messages - save deleted messages in your Archive folder.
    I believe the same is available with a Gmail account.

  • İ have just got ios 5.1 for ipad but i have really important problems about charge,how could i get ios 5.0.1 without loosing my items,documents,i can't sync because my computer has problems also,thanks

    İ have just got ios 5.1 for ipad but i have really important problems about charge,how could i get ios 5.0.1 without loosing my items,documents,i can't sync because my computer has problems also,thanks

    Settings>general>reset>reset network settings
    Settings>general>reset>reset all setting

  • How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them

    How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them. They have a ton of books but I can only listen to them from my windows media player and I wouldlove to download to my I pod but I have tried everything I can think of it they won't go over.  Someone said all I had to do was copy them over and they would convert but I can't even get them to copy.  Thanks.

    Well it started happening AGAIN with my 2nd IPod. No matter what I did, it Itunes would NOT restore it!
    I finally installed Itunes on my hubby's PC at work and managed to get it restored there.
    Apparently, there must be some sort of compatibility issue with the windows version of Itunes and some other piece of software on my pc.
    And one more important thing! I had to follow the instructions in the other thread that talks about how to correctly uninstall itunes and quicktime, in order to completely eliminate ALL traces of my "first" ipod's existence so it wouldn't demand that I restore it.
    I think the software got "confused" and thought when I connected my 2nd ipod, that it was the 1st and that it still needed to be restored.
    Basically, this is just POORLY written and POORLY tested software!

  • How do I get my phone number to appear in the iMessages list

    how do I get a phone number to appear in the iMessages list

    Press and hold on the body in vz msgs then press and hold on face. Press and hold on face again then choose picture and save

  • I accidently unmarked the book marks tool bar, the tool bar and the menu bar how do i get them back ?becaus now only the tabs are visible and i cant access my features or book marks

    i was getting to know my firefox so i accidentally unmarked the menu bar the book marks tool bar and the tool bar. so now only my tabs are visible and i cant get to any of my add-ons or extensions.
    and even surfing the net has become difficult cause there is almost nothing i can do with a new empty tab.
    how can i get these bars back. i tried taking the cursor up to the thin line above the tabs and the window border but the menu to mark the above mentioned features does not appear any more.
    i tried restarting firefox several times but it didn't work. i even uninstalled and completely downloaded a new version of firefox and installed it but the problem still persists.
    i am operations system is windows XP.

    Firefox 3.6+ versions have a feature to allow the user to hide the Menu bar.
    Hit the '''Alt''' key to temporarily show the Menu bar, then open View > Toolbars and select Menu bar, so it has a check-mark. <br />
    The F10 can also be used on most PC's to temporarily reveal the Menu bar.
    https://support.mozilla.com/en-US/kb/Menu+bar+is+missing

  • How can i get my keyboard to be recognized by the imac?

    how can i get my keyboard to be recognized by the desktop imac?

    Hello emanson805,
    Thanks for using Apple Support Communities.
    If you need to set up your Apple Wireless Keyboard with an iMac, then please follow the directions below.  Please note that if the keyboard was previously paired with another device, you will need to unpair it before being able to pair with your iMac.
    Bluetooth: How to set up your Apple Wireless Keyboard - Apple Support
    Have a good one,
    Alex H.

  • How to I get my ipod connected to wifi for the first time..it's an ipod tough 2010 version, refurbished

    how to I get my ipod connected to wifi for the first time..it's an ipod tougch 2010 version, refurbished

    Hi,
    To connect your iPod to wifi just:
         1. Open settings,
         2. Tap Wi-Fi,
         3. Make sure the Wi-Fi switch is on,
         4. Tap the network you would like to connect to,
         5. If  the network has a password then type it in and press join.
    For hidden networks(networks that don't broadcast their SSID(name))
         1. Follow 1-3 above,
         2. Tap other,
         3. Type in SSID(name) of the network,
         4. Select the security of the network,
         5. If there is a password type it in,
         6. Press Join.
    Some public networks may now show a login screen where you  may have to agree to terms and conditions, enter your email etc...

  • How do I get rid of "Your connection failed because the communication device is unavailable"? Pops up 4 times every time I boot my MBP.

    How do I get rid of "Your connection failed because the communication device is unavailable." ?  Pops up 4 or 5 times every time I log on to my MBP.

    Hi there
    Do you happen to use a USB modem or something like that? This could be the cause.
    You could try creating a new network location to see if that fixes it (if not you can just reverse it)
    1. Go to  Menu -> System Preferences
    2. Then go to Network on the 3rd row
    3. Make sure the padlock is unlocked (bottom left) with your admin password
    4. Choose 'Automatic' next to 'Location' at the top.
    5. Choose 'Edit Locations'
    6. Then click the + button, and create a new one called home/test/somethingorother
    7. Click Done -> Save and wait a few seconds
    8. You may have to reconnect to your Wi Fi network etc.
    If you have a USB modem, the above steps will most likely remove its config from the Network preferences. As I said, its reversable (just change location back to automatic)
    Have fun

  • My desktop with iTunes crashed, how do i get my music on my phone to the new Itunes on my laptop?

    My desktop with iTunes crashed, how do i get my music on my phone to the new Itunes on my laptop?

    Have you not got a backup of your content on external drives and/or CDs/DVD ? If so then you can copy that onto the computer and load them into iTunes. Have you tried doing File > Transfer Purchases in iTunes with the phone connected to see if any of you purchases transfer over ? If you are in the US then you should also be able to re-download past music purchases : http://support.apple.com/kb/HT2519
    If you havn't bothered backing up your content then you could see if any of the utilities mentioned on this old post still exist and work : https://discussions.apple.com/message/11014893?messageID=11014893#11014893

  • HT1727 How do i get itunes to recognize music imported into the file structure?

    How do I get iTunes to recognize music imported into the file structure?

    Press Alt or Ctrl+B to reveal the menu bar if needed.
    Use File > Add Folder to Library if you just want to import it.
    If you're trying to relink broken entries in a library with the corresponding media then some more details would help.
    tt2

  • Hi i have a new computer how do i get my back up i tunes onto the new computer ?

    i have a new computer how do i get my back up music on to the new computer

    Backup to what? If you have the old computer and don't have a backup then I suggest doing so, not just for this situation but it's a good idea in general to have important data backed up.

  • TS1424 How do I get credit if I gat a movie 2X

    How do I get credit if I gat a movie 2X?

    Try contacting iTunes support and ask for help : http://www.apple.com/support/itunes/contact/ - click on Express Lane, then iTunes > iTunes Store

Maybe you are looking for