"Cannot evaluate parameter 'NewName' because its argument input did not produce any output." error received

I need to rename a set of files with a subset of the files' original name. I wrote this script:
dir | rename-item -newname {if ($_.name -match '\d{4,5}\-\d{5}\s\-\s(.+)\s\-\s.+\s\-\s.+'){$name=$matches[1]; -replace '.+', "$name";}}
This works in that the file and/or directory names are changed, but it also gives me the error:
Rename-Item : Cannot evaluate parameter 'NewName' because its argument input did not produce any output.
At C:\...\FileStrip.ps1:1 char:28
+ dir | rename-item -newname {if ($_.name -match '\d{4,5}\-\d{5}\s\-\s(.+)\s\-\s.+ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Vivek Shyam:PSObject) [Rename-Item], ParameterBindingException
    + FullyQualifiedErrorId : ScriptBlockArgumentNoOutput,Microsoft.PowerShell.Commands.RenameItemCommand
I'm not sure how to fix this. Any assistance would be appreciated.

ok, thanks.
You've avoided the whole 'use the piped data implicitly' thing by the explicit ForEach. I'm ok with that, but I'm still curious how to get the non-ForEach version to not error.
Anyway, what you provided almost worked. I modified to be this:
dir -file |
   Where{$_.name -match '\d{4,5}\-\d{5}\s\-\s(.+)\s\-\s.+\s\-\s.+'} |
   ForEach-Object{
        $match=$matches[1]
        $newname=$_.Name -replace '.+', "$match"
        Rename-item $_ $newname
to get it working properly.
But it looks like the simplest form is:
dir -file |
   Where{$_.name -match '\d{4,5}\-\d{5}\s\-\s(.+)\s\-\s.+\s\-\s.+'} |
   ForEach-Object{
        Rename-item $_ $matches[1]

Similar Messages

  • Cannot Send Mail - You did not specify any recipients

    Hi all,
    I have an email stuck in my outbox which has the "This message has not been downloaded from the server" issue I have seen on this forum. Everytime I go to my email folders list, I get the 'Cannot Send Mail - You did not specify any recipients' error message. I am unable to trash it, move it as I get the 'Unable to Move Message' error.
    Any ideas how I can remove this message and clear my outbox!?
    Thanks,

    Me too! This is very annoying. I LOVE Apple but this new 3G keeps on throwing curveballs at me. I, too, deleted my e-mail account from my iPhone to get rid of this "unsent message" but with Apple you shouldn't have to do that! Certain that it will happen again, I'm interested if anyone comes up with any fixes so that next time we don't have to delete/add e-mail account.

  • What do i do if my internet is wep and i need it to be wpa2 because my ipod touch 4th gen connects to the internet but when i click on safari or itunes it says safari cannot open the page because its not connected to the internet

    what do i do if my internet is wep and i need it to be wpa2 because my ipod touch 4th gen connects to the internet but when i click on safari or itunes it says safari cannot open the page because its not connected to the internet. i have contacted apple support and they said to change from wep to wpa2 but when i change it to wpa2 and type in password and connect on my laptop it says the saved setting on this computer for the network do not match the require ments of the network

    My 2nd gen works fine with WPA2 and AES encryption.
    You may need to go back and start over.  Reset the router back to factory defaults, log on as the admin, set up security, DHCP, and make sure the IP address pool has enough IP addresses to lease to ALL of the computers/devices that will connect to that the router.

  • Selected file cannot be linked because its type (video) does not match the original file's type

    I've been using Premiere Elements 9 for a couple of years now, and a few months ago I began having problems importing AVI files created from a BlackMagic Intensity Pro capture card.  (These issues were not previously occurring, and since they surfaced, I have exhausted the various settings for the BlackMagic card, used various software such as BlackMagic's own Media Express as well as the freeware VirtualDub, and still have the following problems.)
    In addition, these AVI files play just fine, in their entirety, using Windows Media Player and in Quicktime.
    The problem (or possibly two, but I suspect they could be related) is that most of the AVI files I attempt to import will either (1) import all video and NO audio, or (2) import ONLY a short segment of audio and video, and the length that Elements imports varies.  Usually only in the range of a minute or two.  The rest of the file is not imported at all.
    After much digging in forums, and testing various settings in trying to figure out the issue, I decided to back up all of my files and completely wipe all hard drives and start over with a fresh installation of Windows and Premiere Elements 9.  I haven't installed much else yet, as I wanted to first find out if the reinstallation improved things with Elements.
    For the first project I created in Elements after the reinstallation, Elements successfully imported an entire AVI that was nearly 2 hours long, audio and video.  This was a file that previously would not import properly into Elements.  This suggested that my earlier installation of Elements must have been corrupted somehow.  At this point I was very hopeful that all was well.
    I proceeded to edit the video as I had wanted, saved the project, and exported it to an MPEG format file.  I had originally wanted to export it as an MOV, but I hadn't yet installed Quicktime, so Elements couldn't do that just yet.  The MPEG export was successful and plays fine.
    However, I then installed Quicktime, and once it was finished, I restarted the PC and reloaded the same project.  This time, Elements claimed the media was offline.  I double-clicked on a segment of the video, and directed Elements to the raw file, but then an error message popped up:  "The selected file cannot be linked because its type (video) does not match the original file's type (audio and video)."  This was the same file I had JUST edited and of which I created an MPEG.
    I tried creating a new project and the "Get Media" function to import the AVI again, but this time only the video imported with NO audio.  (This would explain why the error message said what it did, but not why the audio wasn't imported.)
    What in the world is going on with Elements???  I am baffled since the ONLY task I have done on this machine after a complete reinstallation of both Windows and Elements is edit one AVI.  I find it very hard to believe that just installing Quicktime caused this.
    Some info on my system:
    System:  Asus P6T w/ Intel i7 920 and 12 GB memory
    OS: Windows 7 Ultimate
    Video Software:  Premiere Elements 9
    Capture Card:  BlackMagic Intensity Pro (PCI-e)
    Capture Software:  AVIs recorded with either BlackMagic Media Express or VirtualDub (only prior to the reinstallation, as neither of these programs are currently installed)
    I'm getting to the point with Elements that I might need to just abandon it and find something else that is more reliable.  Anybody have suggestions to help with this, so I won't have to migrate?

    mtnsports
    We think that we need to start off with definiting the properties of these .avi files that you are importing into Premiere Elements 9.0/9.0.1 (assumed that you are working for the required 9.0.1 Update).
    You say that the "avi" was created from a "BlackMagic Intensity Pro capture card". What are the properties of this .avi that you imported into Premiere Elements? Not all .avi are created equal. What is the video and audio compression, frame size, frame rate, interlaced or progressive, pixel aspect ratio, typical duration?
    Based on the properties of the video what have you been setting as the project preset?
    Let us start here.
    More later.
    ATR

  • New-AzureReservedIP : Cannot validate argument on parameter 'Slot'. The argument "MyIP" does not belong to the set "Staging,Production"

    I am trying to reserve an IP address in Microsoft Azure using simple PowerShell cmdlet:
    $reservedIP = "MyIP"
    $location = "West US"
    New-AzureReservedIP – ReservedIPName $reservedIP –Label $reservedIP –Location $location
    I get an error:
    New-AzureReservedIP : Cannot validate argument on parameter 'Slot'. The argument "MyIP" does not belong to the
    set "Staging,Production" specified by the ValidateSet attribute. Supply an argument that is in the set and then try
    the command again.
    Any help?
    Thanks

    Greetings!
    Please try the references below which elaborates on the usage of the cmdlet:
    New-AzureReservedIP
    https://msdn.microsoft.com/en-us/library/azure/dn690120.aspx
    https://msdn.microsoft.com/en-us/library/azure/dn769136.aspx
    Thank you,
    Arvind

  • CS5 The selected file cannot be linked because its type (audio) does not match the original file's t

    Greetings,
    I have been working on a very large project using CS5 on my desktop computer. Now I am on the road and bought a laptop so that I can continue to work. I placed all of my assets on a back-up external 2tb drive (which I was able to open without incident on my desktop). I installed CS5 on my new laptop and now when I try to open the project I get the following message "The selected file cannot be linked because its type (audio) does not match the original file's type (audio and video)". This message appears before I indicate the path to any of the assets. Then, when I do indicate the path to each asset, I get the same message for individual files.
    Any advice is appreciated.
    Thanks,
    Jeremy

    I had this problem and have found a solution / workaround:  my issue was when trying to open a cs5 project that had been collected on mac and then transfered to pc, my footage was all png image sequences but this will hopefully work in other situations...
    Open the project and cancel the first dialogue box that pops up where you get the "file cannot be linked" error when trying to reconnect footage.  The project will open and then in the project panel, right click on any footage that needs reconnected and choose "Replace footage..." this will open a dialog that will allow you to select the file that gave you the error in the first place without any issues.  Any sequences with that footage will now work and everything show be all good. 
    You may experience "Offline material is present in this export and will be encoded using the offline media graphic" on first export but apparently you can just ingore that, but i guess it's woth testing a few short sections before commiting to a huge render...
    This workaround isn't perfect as i had about 50 pieces of footage i had to relink via this method one by one but at least it saved redoing the edit which was critical for my project...
    good luck!

  • Need help urgently!! - "The selected file cannot be linked because its type (video) does not match t

    Hey guys... I need your help!! I started a project using Premiere Pro 2 and was 80% when I formatted my computer (all my project files were always saved to a external hard drive). Anyways instead of installing Premiere Pro 2, I installed Premiere Pro Cs3. Problem is whenever I try starting up my project it asks me to link every file used. When I do this it says "The selected file cannot be linked because its type (video) does not match the original file's type (audio and video)." I took my external harddrive to friend's house who has Premiere Pro 2 and it says the same thing. Why did this happen? Is there anyway around it... Any help would be greatly appreciated, I put over 20 hours into editing this movie... I don't want it all to go to waste.

    Frequently answered question
    Cheers
    Eddie
    Forum FAQ
    Premiere Pro Wiki
    - Over 250 frequently answered questions
    - Over 100 free tutorials
    - Maintained by editors like
    you

  • HT204302 i get a message when I plug in my ipod to my laptop saying "cannot use this ipod because apple mobile device is not started" can any one help me with this...I have never had this happen before

    Hello anyone
    I get a message when i plug in my ipod touch saying "cannot use this ipod because apple mobile service is not started" can anyone please help me with this problem...I had this message once before but I forgot how to correct it

    From the More Like This section on the right:
    I get error message when I plug in iPhone 4s saying "This iPhone cannot be used because the Apple Mobile Device service is not started"
    can't get my ipod to connect to tunes error message "cannot be used because the apple mobile device service is not started"  fixes? Using Win XP
    im trying to connect my ipod to itunes and its saying it cannot connect because the "Apple Mobile Device is not started" help
    Or see: iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct with. but also keep the aspect ratio correct? how

    I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct width. but also keep the aspect ratio correct, keep it looking as natural as possible (its a piece of jewlery) ? how can I begin to do this.

    The area circled in red is to wide (the width) the necklace's width is as wide as the models entire chest. And also the length of the necklace it's to long it should come down to the clevage area on the model/woman.

  • The form field arguments.image did not contain a file.

    Hi there,
    I'm getting a strange error with a simple file upload and I
    can't figure it out for the life of me. It's odd, because old code
    I have written before has worked fine in this area, and I really
    honestly can't see where I am going wrong.
    First the error:
    The form field arguments.image did not contain a file.
    The error occurred in
    C:\ColdFusion8\wwwroot\red_roof_rentals\components\query.cfc: line
    37
    35 :
    36 : <!---<cftry>--->
    37 : <cffile action="upload"
    accept="image/jpg,image/jpeg,image/gif" filefield="arguments.image"
    nameconflict="overwrite"
    destination="#getDirectoryFromPath(getBaseTemplatePath())#\properties\">
    38 : <cfset variables.image = "#file.ServerFile#" />
    39 : <cfset variables.thumb = "thumb_#file.ServerFile#"
    />
    I have researched this and found other people have had the
    same problem - although please be aware that I do not beleive this
    to be an issue with whatever version of CF I am running. I have
    still not found an answer.
    I have one template with my form called
    "admin_create_property.cfm". When the form posts it invokes a CFC
    method that uploads the file and inserts stuff into the database.
    However, it dies at the file upload part with that bizzarre error.
    There are only two files working in this:
    admin_create_property.cfm
    query.cfc
    I will write the code out for these so you can see. Please
    see attached code. Please note that I have taken out as much
    irrelevant code as possible (html, doctypes etc etc).
    Any help with this would be greatly appreciated as I am
    absolutley stumped to be quite honest. I've heard people say it
    could be any of the following:
    1 - Need to use enctype="multipart/form-data" - which I DO
    2 - cffile filefield can't contain ## - which it DOESN'T
    3 - Inut type must be file - which it clearly is.
    Please please help, I feel stupid asking about this but I
    need you guys more than ever!
    Kind regards and thanks in advance,
    Mikey.

    I don't get what you mean as this is what I am doing.
    <cfinvokeargument name="image" value="#form.image#" />
    This takes the value of the image file field and passes it to
    the CFC as an argument.
    Am I doing something wrong with this? Sorry for my
    stupidness!
    Thanks for you help, further assistance would be greatly
    appreciated.
    EDIT: Interestingly enough, if I just use the tag on my
    "admin_create_property.cfm" page instead of using the CFC method
    like this...
    <cffile action="upload"
    accept="image/jpg,image/jpeg,image/gif" filefield="form.image"
    nameconflict="overwrite"
    destination="#getDirectoryFromPath(getBaseTemplatePath())#\properties\">
    It seems to upload the image just fine. Why then would this
    not work if all I am doing is simply passing to the CFC the value
    of the "form.image" as an argument so that the file upload can
    happen in my CFC instead of in the calling template??!
    It's really bizzarre.
    Mikey.

  • Error: A 'with' action failed because the specified object did not exist.

    The weird thing is when i play the file on my computer it
    gives me the little error but shows up, but when its live on the
    internet it says its not working and doesnt show up. Can anyone
    help me with this error?
    Level #0: Frame=20
    Movie Clip: Frame=1 Target="_level0.instance2"
    Movie Clip: Frame=1 Target="_level0.mc_0"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_1"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_2"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_3"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_4"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_5"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_6"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_7"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_8"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_9"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_10"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_11"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_12"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_13"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_14"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_15"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_16"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_17"
    Shape:
    Movie Clip: Frame=1 Target="_level0.ctrl_mc"
    Movie Clip: Frame=1 Target="_level0.instance1"
    Movie Clip: Frame=1 Target="_level0._root.prev_photo"
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc_current_photo"
    Shape:
    Movie Clip: Frame=0 Target="_level0.mask_mc"
    Movie Clip: Frame=1 Target="_level0.mask_mc.mask_clip_mc"
    Movie Clip: Frame=0
    Target="_level0.mask_mc.mask_clip_mc.mask2_mc"
    Movie Clip: Frame=1 Target="_level0.soundControl"
    Movie Clip: Frame=1 Target="_level0.soundControl.instance8"
    Shape:
    Movie Clip: Frame=0 Target="_level0.mask_whole_mc"
    Movie Clip: Frame=1 Target="_level0.control"
    Movie Clip: Frame=8 Target="_level0.control.myLoader"
    Shape:
    Movie Clip: Frame=1
    Target="_level0.control.myLoader.instance9"
    Edit Text:
    Target="_level0.control.myLoader.instance9.instance10798" Variable=
    Visible=true Text = loading."
    Movie Clip: Frame=1 Target="_level0.tishi"
    Shape:
    Edit Text: Target="_level0.tishi.instance5" Variable=
    Visible=true Text = CONTROL PANEL"
    Movie Clip: Frame=1 Target="_level0.mc_mouse"
    Shape:
    Movie Clip: Frame=2 Target="_level0.mc"
    Movie Clip: Frame=1 Target="_level0.mc.booor"
    Shape:
    Button: Target="_level0.mc.booor.next"
    Shape:
    Shape:
    Button: Target="_level0.mc.booor.prev"
    Shape:
    Shape:
    Movie Clip: Frame=1 Target="_level0.mc.booor.autoplay"
    Button: Target="_level0.mc.booor.autoplay.instance6"
    Shape:
    Shape:
    Edit Text:
    Target="_level0.mc.booor.autoplay.instance6.instance7" Variable=
    Visible=true Text = PAUSE"
    Text:
    Edit Text: Target="_level0.mc.booor.photo_title" Variable=
    Visible=true Text = exterior18"
    Error: A 'with' action failed because the specified object
    did not exist.
    Error: A 'with' action failed because the specified object
    did not exist.
    Error: A 'with' action failed because the specified object
    did not exist.

    show your code with the trace() function that indicates the
    object is defined (along with the output panel's result).

  • A connection attempt failed because the connected party did not properly respond after a period of time

    Prior to the Increase Capacity for Outbound Network Calls update, my Azure websites running in
    Standard mode experienced occasional connection attempt failed errors. Since this update the errors stopped but starting on 12/30/14, these errors started up again on both
    South Central and East regions:
    "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [IP]:80"
    It occurs when attempting to consume an external web service over HTTP. This issue is not reproducible on our local environments nor did it occur with our previous shared hosting provider.
    On Azure, the same web service call can result in this error or will return a response successfully.
    There doesn't appear to be any pattern as to why the same call would work one time but not another.
    How can this be resolved again? Any feedback is appreciated. Thanks.

    Hi,
    Please have a look at this article:
    http://blogs.msdn.com/b/narahari/archive/2011/12/21/azure-a-connection-attempt-failed-because-the-connected-party-did-not-properly-respond-after-a-period-of-time-or-established-connection-failed-because-connected-host-has-failed-to-respond-x-x-x-x-x-quot.aspx,
    it gives us several ways to solve this issue, hope this helps.
    Best Regards,
    Jambor 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I recently installed the trial version of Adobe XI and the trial period ended, so I wanted to revert back to the version I already had. I did not see any uninstall feature and my old version was apparently replaced by the trial version. I cannot re-instal

    I recently installed the trial version of Adobe XI and the trial period ended, so I wanted to revert back to the version I already had. I did not see any uninstall feature and my old version was apparently replaced by the trial version. I cannot re-install a previous version b/c I need both a product Id (GOd only knows where that is now) and a way to uninstall the trial. Any ideas?

    When you installed the trial, there should have been an option to have ignored your current installation and leave it. Apparently you skipped that case. To uninstall the trial (in Windows) go to Control Panel>Programs & Features and select the Acrobat XI and choose uninstall. After the uninstall run http://labs.adobe.com/downloads/acrobatcleaner.html to clean up your system. HOWEVER, if you see your old Acrobat in that window, do not run the cleaner, but do a repair on the old version.
    You did not mention the old version you had. You might try from http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html. As for the S/N, you should have register and if so you can get it from Adobe. The instructions are at http://helpx.adobe.com/x-productkb/global/find-serial-number.html#adobeproductdownload.
    Be sure to backup any download of the old installer and the S/N to CD or backup HD for future use. They will not likely continue to be available.

  • I did not use my computer yesterday, and now all of a sudden, Firework does not open at all after clicking on its icon or starting as a program. I did not download any upgrades or anything else, and I have Norton 360 v.3. What could be the problem, how ca

    I did not use my computer yesterday, and now all of a sudden, Firework does not open at all after clicking on its icon or starting as a program. I did not download any upgrades or anything else, and I have Norton 360 version 3. I can open Internet Explorer, but that's not my default browser, so I have no problem with the Internet connection.
    What could be the problem, how can I restore my browser without losing my bookmarks, settings, etc?
    == Operating system ==
    windows XP

    If you close Firefox, then start Firefox in Safe Mode, does the problem still occur? For instructions on starting in Safe Mode, see [[Safe Mode]]. Extensions can sometimes be the cause of problems. If the problem does not occur in Safe Mode, then you can disable your extensions one-by-one until you find out which one is causing the problem. See [[Troubleshooting extensions and themes]] Update Firefox, see [[Updating Firefox]]

  • 3GS 3.0.1 - Cannot send mail, You did not specify any recipient

    Whenever I send a message from iPhone with MobileMe account and then resync the account with server (Push is off), the very same message, already sent with success, appears in Outgoing folder and error pops up saying:
    *Cannot send mail, You did not specify any recipient*
    See the picture below:
    http://gitarzysta.com/iphone/error1.jpg
    It cannot be deleted, either - error message pops up saying: *Unable to move message*
    http://gitarzysta.com/iphone/error2.jpg
    Important: it was sent and received successfully. It is just either iPhone, MobileMe or both that have problems to sync correctly.
    On my Mac that I sync with this MobileMe account all is fine.
    What can be wrong? There was an old topic here, from 2008, where several users of 3G had exactly the same issue, but no root cause or solution was provided.
    Thanks!
    Message was edited by: gitarzysta

    Try deleting and manually recreating the account on your iPhone.
    If you transferred the account settings from your Mac via the iTunes sync process - selected under the Info tab for your iPhone sync preferences with iTunes, deselect this for your iPhone sync preferences followed by selecting Apply before doing so.

Maybe you are looking for

  • CRM 2011+An error has occurred during report processing. (rsProcessingAborted)

    Hi,  i have installed CRM 2011 on-premise version in Server A. Database and CRM 2011 Reporting Extenison in Server B. Both the server are 64 bit server and IIS 7.0 . i can able to browse the Report server url. USer as been added in Sql DB Logins and

  • Data Guard Failover after primary site network failure or disconnect.

    Hello Experts: I'll try to be clear and specific with my issue: Environment: Two nodes with NO shared storage (I don't have an Observer running). Veritas Cluser Server (VCS) with Data Guar Agent. (I don't use the Broker. Data Guard agent "takes care"

  • RMI in 1.3.1 vs. 1.1.7 - code that works in 1.1.7 fails in 1.3.1

    I have an RMI server and client that works great under JRE 1.1.7. At initialization, the server installs RMISecurityManager, creates a registry using LocateRegistry.createRegistry(), creates a remote-server object and registers it in the registry. Th

  • Profitability Reporting at Package (BOM) level

    How do other companies address this issue: We sell product solutions (packages) consisting of one or more components and for logistics purposes need to process at component level in sales order, delivery, material doc etc.  However from a finance, ma

  • Package body does not compile in Object Browser

    Hi there, I am trying to compile a package body using the Apex Object Browser. However, when I click the "Compile" button no message is displayed in the box above the package body code. I reduced the amount of code by removing comments and extra carr