I am trying to have a function search for all the files of a specific name and then rename them. I have been able to make this work if I navigate to the directory first but if I dont I get an error saying the file does not exist. I just wanted to see if this just how powershell works and you have to be in the correct directory? Thanks.
Thanks so much Tom, that worked perfectly had no idea about .fullname. I am definatly going to start putting more write-host in my code in the future to catch things like that. Thanks again.
It’s an annoyance in powershell 5. Converting the output of get-childitem to a string doesn’t give the full path. in powershell 6 you get the full path.