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: Batch file or Exe to copy & rename directory and update files

28 Apr 2012   #1

Windows 7 x64
 
 
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" to "Genesis\Vehicles\truck\diesel\4tonbutcher"

The batch file needs to be run without the need for a command line box being opened, that is, if the user can double click on it or run it with a 'right click' that would be great. Problem there is, I maybe need an exe file not a batch file. The other part of the problem is that the folder to be copied may or may not be in the same location on every PC that runs the file. It may be the case that the 4tonbaker folder is on;
C:\Genesis\Vehicles\truck\diesel\4tonbaker or
D:Genesis\Vehicles\truck\diesel\4tonbaker or even
E:\Games\mystuff\Genesis\Vehicles\truck\diesel\4tonbaker

and I require the end user to have no need to know, just for the directory to be copied and renamed when and where it is found.

If possible I then want the batch file to perform a second task. I want to distribute a folder, lets say it is 4tonbutcher and in that folder there are files lets say doc1.txt, doc2.txt and doc3.txt

On any given users PC 4tonbaker has these same named files but the content is different to the ones in my folder 4tonbutcher, I want to update the newly created folder, 4tonbutcher with the new txt files I distribute.

So, User downloads a folder called 4tonbutcher from my site.
Batch file copies and renames a folder from a location on the users PC, "Genesis\Vehicles\truck\diesel\4tonbaker" to "Genesis\Vehicles\truck\diesel\4tonbutcher"
Batch file copies doc1.txt, doc2.txt and doc3.txt from the downloaded folder to the newly created folder 4tonbutcher

I need this to be easy for me to do as well otherwise i would not be here asking how to accomplish this. Any ideas?

Thanks.


My System SpecsSystem Spec
.

29 Apr 2012   #2

Windows 7 Ultimate x64 SP1
 
 

Sounds like you need a windows shell program, I'm not expert enough to help you with this

Here's a nice tutorial:

Win32 Shell Scripting Tutorial

Off topic: this is trivial to do in UNIX, I can whip up a shell script for that in no time...
My System SpecsSystem Spec
Reply

 Batch file or Exe to copy & rename directory and update files




Thread Tools



Similar help and support threads for2: Batch file or Exe to copy & rename directory and update files
Thread Forum
Batch file to copy files from C drive to USB Backup and Restore
search multiple files, copy+paste to new folder (batch file software?) General Discussion
Solved a simple batch file for copy files and folders General Discussion
Solved Update (copy) file to multiple places in directory structure 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 01:26 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33