[quote quote=165973]The point is you have to create a non existent folder before you copy something to it!! How you provide the name is totally up to you.
[/quote]
I have to hard code a folder, then prompt a user for a folder ?
Don’t I want to go two levels deep from the parent, then search for the $foldername ? I think I see what you mean, go to the $foldername which is two levels deep.
No! You did not! You requested the input from the user with Read-Host and you tried to use the provided input in your loop but you did not create the target folder.
No. It is not required to hard code the target folder.
It is required that you create the target folder BEFORE you try to copy some files to it.
@Olaf, I hope the following changes reflect what you mean, if not; could you please explain ?
Currently the code asks for a folder name as in $folderName, and asks for a $targetFolder but the symbolic link is not being created from the parent folder, excluding the folder name as in the $folderName variable ?
That will be my last answer for you. I don’t know how to explain it for you that you can understand it.
Does this target folder already exist?? If your answer is “NO” - YOU WILL HAVE TO CREATE THIS RARGET FOLDER FIRST … before you try to create a new file in it.
@Olaf - Hold on a second, you tell me, that I must literally create the target folder, but I don’t want to create it before running the script; I want the script to create it for me.
But you have to code this. Powershell is not magic … it does what you tell it to do.
I think you should make a big step back and start with learning the very basics of Powershell first. That will save you from a lot of frustration and wasted time.