help scripting way to copy/rename one file to subfolders

Page 2 of 2 FirstFirst 12

  1. Posts : 90
    Windows 7 x64, ultimate/pro/home, SLES x86 & ia64
    Thread Starter
       #11

    yes, everything is on F:\ drive. i copied my master file to F:\master.txt. or to F:\master without an extension. whatever you prefer.
    the subfolder part i was kind of vague on, but let's keep it simple.
    I will manually go into each folder that contains all the files i want to replace, so it would only be a matter of doing a 'dir' in that folder to obtain every filename matching the suffix i am looking for,
    then doing a 'copy F:\master <destination name>'

    if you can put a variable in the script, such that suffix = '.txt' and use that so it's obvious all i have to do is change that one thing at the top of the script then cool.

    if you can further somehow recursively search subfolders from the location the script is run and change all matching files within that directory tree, then bonus it saves me work searching.... which was why i asked this because i don't know windows scripting
      My Computer


  2. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #12

    I don't prefer F:\master.txt of course! Otherwise that file is also one of the files to be renamed!
      My Computer


  3. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #13

    #5 has been modified. F:\ is the root where the *.txt files are. The may also be located in its subfolders. F:\master is the template.

    Do you want F:\ to be configurable? F:\master is a fixed name and contents, or also configurable?
    *.txt must be configurable?
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:10.
Find Us