Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Help with Batch File  (Read 3779 times)

0 Members and 1 Guest are viewing this topic.

taemx

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Windows 10
    Help with Batch File
    « on: October 01, 2019, 10:56:57 PM »
    Hi, I usually write in vbs for Excel and have limited knowledge of C and html/css. I don't have any experience with batch files, but would like to make a batch file to help me out.

    In a nutshell, I need to select multiple files in a folder that all have the same characters at the end of the filename. I don't need the files moved, or copied, or deleted, or renamed... only selected. Apparently this question is not asked often because after hours of Google searching, I still haven't found a sufficient answer of how to do this, lol.

    So, I have about 200 excel documents which all share a similar design, but with different information on them. I'm constantly tinkering with the mechanics of the documents (not the data therein) and have written a vbs script to copy all of the data from one sheet and put it into a new document but up the version number, and still keep the old document. This last part is important because sometimes the new sheet is not compatible with some of the old data and I need to reference that old workbook. Conversely, sometimes I made one quick edit after the next and can delete the entire prior version instead of saving it. Anyway, What happens after the script runs is my folder has all of the old workbooks and all of the new workbooks. Each workbook has it's name and version number as such, "RedRose (v6.12).xlsm", so a new version would be, "RedRose (v6.13).xlsm". So now I have to manually select hundreds of files with the older version number and either move them to a new folder or delete them. This is ridiculously time consuming!

    I want a batch file which;
    -recognizes the current folder it's ran from
    -prompts user for version number, ex. 6.12
    -selects all files in the current folder with that version number

    Any help is greatly appreciated. Thank you for taking the time to read this.