Batch Append Filenames - 2nd Scenario

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 11 months ago.

  • Author
    Posts
  • #5040

    by Mondeoman at 2012-08-23 09:08:27

    Hi all, I am trying to find a powershell script that would help me with renaming in the following scenario:
    I have folders with a single video file "Moviename.avi" and 2 identical Image files "folder.jpg + Moviename.jpg" also enclosed.
    What I would like to do is rename the "Moviename.avi" file and the Image File "Moviename.jpg" with its current "Folder Name".

    Example Before:
    C:\Temp\Videos\Terminator (1984ST)\Terminator (1984).avi
    C:\Temp\Videos\Terminator (1984ST)\Terminator (1984).jpg
    C:\Temp\Videos\Terminator\Folder.jpg

    Example After:
    C:\Temp\Videos\Terminator (1984ST)\Terminator (1984ST).avi
    C:\Temp\Videos\Terminator (1984ST)\Terminator (1984ST).jpg
    C:\Temp\Videos\Terminator\Folder.jpg

    Once again many thanks in advance to anyone that can help.
    As I am a noobie to powershell, I do have other questions to ask later if this can be solved.

    by JeffH at 2012-08-23 10:47:06

    This is similar to what I showed you before. Did you try to work this out on your own? That's the only way you will learn PowerShell.

    by Mondeoman at 2012-08-23 21:04:57

    Sorry Jeff but I tend to learn things quicker by going back through the correct answer especially when it comes to computer programming etc.
    Best regards

You must be logged in to reply to this topic.