Auto Duplicate file X Times ?

Page 3 of 3 FirstFirst 123

  1. Posts : 10
    Windows 10

    Bree said:
    This .bat was written to meet the the needs of the OP, specifically to make multiple copies of one file. Your needs are different, and this .bat doesn't meet them. Rather than adapting it, you should start from scratch, maybe using some of the techniques learned from my examples.

    Writing a batch file is as much an exercise in programming as is writing the C++ code to compile into a program. First you should write down in simple language the steps you want it to take, and what steps it should take should certain conditions occur (eg, a pre-existing file name). Write it as a simple set of instructions a person could follow manually, without needing much in-depth understanding. Then take those simple instructions and translate them into an appropriate sequence of commands to put in a batch file.

    The key to writing an effective batch file is to have a clear idea of what you want it to do and how it should cope with unexpected situations before you start writing the actual commands.

    I don't have a clear idea of what you want, so can't really suggest suitable changes. You may well find that just by taking a step back and trying to explain in simple language the steps you want to achieve, then the way to do it would become clear.
    Thank you for those words of wisdom, i took you're advice and went back to the drawing board. I've learned from you're code. im a hands-on kind of coder. i like to test and see results. This is what i ended up doing. this is for a project to use a Decompiler to then rename/move and delete. i am always willing to learn.Auto Duplicate file X Times ?-code.png
      My Computer

  2. Bree's Avatar
    Posts : 18,617
    10 Home x64 (20H2) (10 Pro on 2nd pc)

    Mizzy said:
    Thank you for those words of wisdom, i took you're advice and went back to the drawing board. .... i am always willing to learn.
    Looks like you are doing well, nice use of date/time there.
      My Computers

  3. OtherWay1982's Avatar
    Posts : 157
    Windows 10 Home
    Thread Starter

    Ztruker said:
    My curiosity is peaked! @OtherWay1982, can you tell me why you need (or want) to do this?
    basically there is a image file that works with a ini settings file, in a specific software.
    cant really remember totally because i had a computer wipe. seemed to have wiped my brain about this along with it :)
    but i think it was to make a copy of this ini file. all i needed to do is rename that file to the corresponding image that goes with it and it works. I dont totally recall. but because i have to do this again im trying to look up old threads to get the two bat files i had. so far i kinda found one but missing the others. the main file for this was on stackoverflow website my account there. but they since removed my account so that information is lost so far.
      My Computer

  4. Ztruker's Avatar
    Posts : 13,505
    Windows 10 Pro X64 20H4 19042.746

    Okay, thank you.
      My Computers

  5. Posts : 1


    Bree said:
    Yes. That is a relatively easy change to make. Use MultiCopy2.bat (attached in a .zip). Drop the extracted .bat into the folder where you want to make duplicates and run it, you'll be asked for a file name and the number of copies. This one can cope with spaces in the file name.

    Well, normally I'd say just ask away, but this could grow into a very long thread that way

    I Googled for a CMD guide for you, there are many out there, but most are not very good. The link I gave at the bottom of post #7 is the best one I found, if you wish to learn more.
    Created an account just to download this. It works as intended!

    Mizzy said:
    I ran the bat in CMD but for some reason i can't get it to run, what line do i edit?
    Attachment 273207
    Thank you so much V2 Bat works great but i want them to go in another folder after copy, and instead of copy could it be possible to just move/rename? isnt that mv?

    Attachment 273209
    I figured out what you meant, i just wanted it to copy only that file. is it possible to add a break and then copy another file name at the same time? and is it possible to automatically rename, lets say i already have Copy 1 and i run the Bat again, and i make 1 copy it would replace, i want it not to replace but rename. i've been messing around this some commands but i can't seem to get what i want.

    - - - Updated - - -

    I figured some of it out, i think im getting the hang of this.Attachment 273218
    I still trying to find out how to load and copy both files at once, so i just run the bat and it automatically copies and renames both files once. i know this was intended for copying a single file multiple times and this led me to the right track. i might be over thinking this and it might be simple. lol
    There's a program called Bulk Rename Utility that does what you want. I use it when I need to batch rename more than one file at once without needing to manually rename them one by one unless those names are unique per file in which case this program won't help... What it didn't have was being able to copy one file and then specify how many times and where to save them. Went on the interwebs and found this thread, even though it doesn't let you specify directory save location of the duplicated files, having them saved in the same folder as the file you want to copy, it does the other bit I need well - just need to manually move those duplicated files....
      My Computer

Page 3 of 3 FirstFirst 123

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

Designer Media Ltd
All times are GMT -5. The time now is 06:41.
Find Us

Windows 10 Forums