New
#1
help scripting way to copy/rename one file to subfolders
i have a bunch of files on F: drive. There are many subfolders. i have one file called 'F:\master' whos data i want to copy to another file within the subfolders having some unknown name- the only thing i know is the suffix of the file name. so i have folders a, b, c, d, and so on. within each folder are a bunch of files named whatever. for every .txt file in the subfolders i want to copy the file 'master' to.
for example in folder 'a' if i have file named 'hello.txt', what i want to happen essentially is 'copy F:\master F:\a\hello.txt'. If i do a 'dir F:\a\*.txt' and find it has 100 files called hello1.txt, hello2.txt and so on then i need 'copy f:\master f:\a\hello1.txt' and to hello2.txt hello3.txt and so on.
how can i accomplish this?
thanks.