• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Powershell question

unwantedSN

Weaksauce
2FA
Joined
Jan 9, 2009
Messages
100
I wasnt sure where to put this but I know a lot of you here use power shell. Im having issues trying to wrap my head around the correct syntax and thought maybe some of you could help. In a nutshell im trying to copy a file from one path to another, but its a bit weird. What i need to happen is to copy from my source to multiple destinations. I need to go from c:\newfolder\file.ext to d:\employeefolders\unkown_variable\newfolder\filename.ext

The\unknown_variable\ folder is consistently changing the only thing that i need it to do is put my test\file.ext directory in there if their is a folder.

here is what i tried, but it fails.

PS C:\> Copy-Item C:\test\testfile.txt d:\employeefolders\*\test\

anyone know how to make this work?
 
Get-ChildItem -Recurse -Path c:\temp | ?{ $_.PSIsContainer } |forEach-Object{copy-item c:\temp\text.txt $_ }

This doesn't do what you want, but it will give you a start, fi i have mroe time ill figure out the exact answere
 
Back
Top