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


  1. Posts : 1
    Windows 7 x64
       #1

    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 Computer


  2. Posts : 73
    Windows 7 Ultimate x64 SP1
       #2

    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 Computer


 

  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 01:31.
Find Us