Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: help scripting way to copy/rename one file to subfolders

17 Sep 2014   #11
ron7000

Windows 7 x64, ultimate/pro/home, SLES x86 & ia64
 
 

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 System SpecsSystem Spec
.
17 Sep 2014   #12
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

I don't prefer F:\master.txt of course! Otherwise that file is also one of the files to be renamed!
My System SpecsSystem Spec
17 Sep 2014   #13
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

#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 System SpecsSystem Spec
.

Reply

 help scripting way to copy/rename one file to subfolders




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Won't let me rename or copy files
I decided to try some themes and the one I installed I didn't really like it so I decided to go an uninstall it. I restored my backup explorer.exe but then delete the one from the theme but it wouldn't let me. It didn't give me any errors. It showed the screen with the progress bar of it being...
General Discussion
'Rename' box doesn't show up when I rename a file shortcut
So basically (I'll try to be descriptive), I have an Excel file (extension xlsm) on my USB and I right click it, send to --> desktop (create shortcut). I see the shortcut. I right click and attempt to rename it with a different file extension, but the 'Rename' box doesn't show up like I believe it...
General Discussion
How to copy and rename Language in Windows 7?
English is spoken all over the world. Windows have option of EN (US), EN (UK), EN (IN) etc, I want to copy EN (UK) and rename it with my own country's format (currency, date & time styles etc) as EN (PK)* Can anyone help me how can I do this? *Pakistan
Installation & Setup
Batch file or Exe to copy & rename directory and update files
I require a batch file or free utility that i can redistribute from my web site to other users, (gamers) that will copy the contents of a directory inside their game to a new location and re-name the directory at the same time. Something like this; Copy "Genesis\Vehicles\truck\diesel\4tonbaker"...
General Discussion
I want to Copy & Rename, not Copy & Replace
When I drag a file into a folder that has a similarly named file, I am asked to either "Copy and Replace" or "Don't Copy". I would love it if there was a third option "Copy and Rename". I would get so much done so much faster. I'm hoping there is some kind of registry tweak I can do to get...
General Discussion


Our Sites

Site Links

About Us

Find 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 03:52.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App