Windows Macro Recorder - HELP

Anonymous
2018-05-17T07:36:19+00:00

Hello all.  I am of the vintage when i upgraded from a pc to an xt i thought i was king kong.  (1984/85).  Back then I would create a batch file to automate steps and it was all too easy.  Move forward to 2018 and I am bamboozled trying to do the same.  I simply want to move to a directory (manually) then create 3 additional directories and name them within the one I am in.  Can someone please suggest a simple App that will do this.  Thankyou

Windows for home | Windows 10 | Accessibility

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Anonymous
    2018-05-17T07:51:48+00:00

    This is easily done with a batch file.

    To avoid any misunderstands it would be helpful if you posted an actual example of what you're trying to achieve, i.e. something with real folder names.

    0 comments No comments
  2. Anonymous
    2018-05-17T10:47:07+00:00

    Yes as mentioned, the batch file used to work.  Just for the sake of this case, lets say I want to:

    create a new directory and name it Invoices.

    create a new directory and name it statements

    create a new directory and name it credit notes

    all within the same directory.

    Thank you

    0 comments No comments
  3. Anonymous
    2018-05-17T18:13:40+00:00

    While you could use macros to achieve your aim, I would discourage you from doing this. In a multitasking environment, macros are quite unreliable. A far better method would use an additional folder context menu item. You would simply right-click the current folder (e.g. "2018"), then left-click "Create Subfolders". This would give you the nominated subfolders under 2018.

    Here are the steps to install this tool:

    1. Mark the code line below (starting with "cmd"), then press Ctrl+C to copy it.
    2. Press the Windows key + R, then Ctrl+V to paste the code line.
    3. Press Enter.
    4. Mark the script below (starting with @), then press Ctrl+C to copy it.
    5. Right-click the file "C:\Tools\Create Subfolders.bat", then left-click Edit.
    6. Press Ctrl+V to paste the script.
    7. Save & close the file.
    8. Double-click "C:\Tools\Create Subfolders.bat" to install the context menu item. Accept the challenge to modify the registry.
    9. Right-click any folder while in File Explorer, then left-click Create Subfolders.

    Code Line

    cmd /c md c:\Tools & cd 2>"c:\Tools\Create Subfolders.bat" & pause

    Script

    @echo off

    goto :Start


    Create three subfolders in the current folder.

    On the first run, create a registry entry for

    an extra context menu item.

    17.5.2018 FNL


    :Start

    if not exist "c:\Tools\Create Subfolders.reg" (

       echo> "c:\Tools\Create Subfolders.reg" Windows Registry Editor Version 5.00

       echo>>"c:\Tools\Create Subfolders.reg" [HKEY_CLASSES_ROOT\Directory\shell\Create Subfolders]

       echo>>"c:\Tools\Create Subfolders.reg" [HKEY_CLASSES_ROOT\Directory\shell\Create Subfolders\command]

       echo>>"c:\Tools\Create Subfolders.reg" @=""C:\Tools\Create Subfolders.bat" "%%1""

    )

    reg query "HKEY_CLASSES_ROOT\Directory\shell\Create Subfolders" 1>nul 2> nul

    if %ErrorLevel% EQU 0 (

       if not exist "%1\Invoices"     md "%1\Invoices"

       if not exist "%1\Statements"   md "%1\Statements"

       if not exist "%1\Credit Notes" md "%1"Credit Notes"

    ) else (

       "c:\Tools\Create Subfolders.reg"

    )

    0 comments No comments
  4. Anonymous
    2018-05-17T23:49:08+00:00

    Wow

    Frederik Long

     Thankyou ever so much for your response but your knowledge and mine are light years apart as this syntax is way beyond me and further, more complex than I was looking for.  Some more background if you would be so kind to consider it.  I have say 40 Suppliers to my little shop and I am wanting to save wasting paper on printing out all of the invoices, statements and credit not they send me so I wanted to simply create a supplier directory say 'Utility Company' then within that directory, create 3 directories named "invoices" , 'statements' and 'credits'.  As I have 40 suppliers, I simply wanted to create these 3 directories as noted above for each supplier.

    So what I wanted to do was very simple, a 1 off task and thats about it.   For this reason, to create the 'automation' needs to be quick and easy. I downloaded an app called "tiny ???' and could not get that to do what I wanted ... at this stage, I could have done the task manually by now and been finished but .... I downloaded an app Pulovers Macro Creator and quickly realized that this program was very good but way too complicated over the top for what I am needing.

    So Mr Frederik, am I a lost cause or is there a simply way or application to do this task.  Thankyou even for taking the time to read all of this.

    Further, i am interested in learning how to code windows to create little scripts for my own purpose.  Could you please direct me to where I can learn the syntax of what you did above please

    Kind Regards

    darren

    .

    0 comments No comments
  5. Anonymous
    2018-05-18T08:38:29+00:00

    So Mr Frederik, am I a lost cause or is there a simply way or application to do this task.  Thankyou even for taking the time to read all of this.

    Further, i am interested in learning how to code windows to create little scripts for my own purpose.  Could you please direct me to where I can learn the syntax of what you did above please

    The method I gave you is simple. It looks complicated in my post because I needed to make very sure that someone with little technical knowledge would succeed no matter what. It's much like describing a car wheel change. To a mechanic I would say "Change the wheel!". To a novice I would need to explain where to car jack is, how to jack up the car, how to undo the nuts (clockwise or anticlockwise?) etc. etc. If you feel that you can trust me then I'll install my script for you under remote control within a couple of minutes.

    Batch files in their simplest form are a collection of console commands. This implies that you must know your console commands before you can put them inside batch files: copy, del, md, echo, type, setetc. There are a few dozen of these that you would need to know. The console command help gives you a nice collection.

    In their advanced form batch files use variables and conditional execution. This is a bit of a black art and requires a combination of experience plus trial and error. A Google query such as help batch files will probably get you lots of help. The best way is to try something simple, then build things up gradually. I'm happy to help you if you have a specific question.

    Note also that batch files are not "nice" from a programmer's point of view. They are "quick and dirty". If you want a nice scriping language then you could use VB Script or PowerShell. VB Script is somewhat chatty and requires an IDE (Integrated Development Environment) in order for you to be really successful. PowerShell is incredibly powerful and very terse. I never quite managed to wrap my mind around it. VB Script is my game.

    0 comments No comments