How do I copy one file to a folder and all its subfolders in Windows 7?
will be copied to
folder/file.txt folder/sub1/file.txt folder/sub2/file.txt
This example, the directory c:\prc\a\fa has a file called file1, and subdirectories a,b,c,d
The line that says for /f ......... will do it if you remove the word echo
This FOR would also do it
just remove the echo
there may be a better way than putting . in there but it works fine
|show 2 more comments|
You can use following PowerShell script:
Save above in to copy1tomany.ps1 file. Press Ctrl+Win and type powershell to get the Powershell prompt. Navigate to folder and type copy1tomany.ps1.