I am trying to write a script that pulls the name of a sub-directory from a file and then moves into that sub folder. The idea being that the file contents can change and thus the sub directory can change as well:
Here is a toned down example of what I am doing but it will give a good enough idea that i think and responses will get me my answer
$folder = get-content c:\temp\folder.txt (folder.txt will have only the name of a sub folder in this directory)
What I am trying to then accomplish is something along the lines of:
I have not been able to figure out exactly what I need to do this. I've tried Tee-Object, Invoke-Command, invoke Item, get-childItem, etc... all to no avail.
Any help would be much appreciated!