Batch file to move folders from one drive to another.

Page 2 of 2 FirstFirst 12

  1. Posts : 456
    Windows 10
       #11

    The highlighted folders don't get passed to the batch file as an argument just because they are selected (highlighted) while the batch file is executed. You have to drag and drop the folders to the batch file, when you right click, select "send to", batchfile that is the same as you would drag and drop the files to the batch. But if you only highlight folders and then execute a batch file the batch file simply ignores the folders this is the expected behavior.
      My Computer


  2. Posts : 221
    Windows 10 Pro 64 bit (22H2)
    Thread Starter
       #12

    ricardobohner said:
    The highlighted folders don't get passed to the batch file as an argument just because they are selected (highlighted) while the batch file is executed. You have to drag and drop the folders to the batch file, when you right click, select "send to", batchfile that is the same as you would drag and drop the files to the batch. But if you only highlight folders and then execute a batch file the batch file simply ignores the folders this is the expected behavior.
    OK, so how do I create a macro to make a Key Press act like a drag and drop an "argument" to a batch file? Is that even possible.

    I've had a look through the AHK tutorials, and can find no mention of it (although there are ways to make a key press left-click+hold, then move the mouse pointer to x,y co-ordinates, but this seems a little cumbersome to me, as well ass relying on the batchfile, or the shortcut to the batch file remaining in the same place on the desktop.
      My Computers


  3. Posts : 456
    Windows 10
       #13

    @smartcooky don't think batch has a native way of knowing which folders or files are selected in File Explorer. Maybe Powershell, VB Script or another programing language.
      My Computer


 

  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 17:14.
Find Us




Windows 10 Forums