VBScript to Copy Multi Selected Files From Open Windows File Explorer RRS feed

  • General discussion

  • Hi There,
    I do some work work for an Internet Radio station and therefore deal with a VERY large volume of Audio Files. I am constantly Coping/Moving Files from one folder to another creating Playlists. Currently this is done via Drag and Drop or Copy and Paste and is very tedious.

    So what I am trying to put together is a Tool that can help me.


    When I am in Windows File Explorer or if possible Xyplorer I can select multiple tracks and then trigger a macro which will detect the selections and invite me to select a folder for them to be copied.

    I is also important I keep and Audit trial.

    I done some research and got some bit of code to do the copy and audit trail but where I am stuck is the first part detecting the selections in file explorer and get them ready to be copied to the new locations

    Any help would be greatly appreciated
    • Changed type Bill_Stewart Tuesday, April 14, 2020 5:03 PM
    • Moved by Bill_Stewart Tuesday, April 14, 2020 5:03 PM Unanswerable drive-by question
    Friday, October 25, 2019 6:36 PM

All replies

  • There is not enough information in your request to be of much help to you.  If the details page of a file properties does not have track information then you are out of luck. Many audio files do not contain such information. You will have to study the type of audio files you have and determine how to access that information if it is available. Example: WAV files do not have track info but may have internal encoding that a custom player can see as tracks.

    MPEG audio can have track info but it may also be in a proprietary format.

    Many custom audio formats cannot be discovered if the vendor does not publish an API.


    Friday, October 25, 2019 6:58 PM
  • This sounds interesting, but you're not asking in the right place. This is a scripting questions forum.

    (And before you ask: No, sorry, I really don't know where you should ask. This is really some research you will probably need to do on your own.)

    -- Bill Stewart [Bill_Stewart]

    Friday, October 25, 2019 6:58 PM
  • I think I may of over complicated my request.

    Can you be in Window 10 File Explorer manually select 4 files then initiate a script to copy to another location?

    Friday, October 25, 2019 7:38 PM
  • Assuming that a file is what you mean by a track then yes you can by using the Shell object. This cannot be easily done with VBScript but can be done by C# or VB,Net. Search for docs about "Shell" programming to see what is available.

    The best way would be to use the shell programming to create an extension (shell extension) thaqat can do what you ask.

    Basically you need to refine your request.  It is clear you have no programming background so staing requirements correctly will be a challenge.

    Ask in the C# or Desktop developers forums to get more info.

    The Shell can also be automated via PowerShell but many functions of the Shell will not be available.

    You can also create a Windows Form with PowerShell that will allow you to synthesize most of your needs.  Also the "FileBrowser" class can be used in PowerShell directly to scatter gather files and process them.

    Here is a simple example of how to select multiple files.

    Add-Type -AssemblyName System.Windows.Forms
    $ofd = [System.Windows.Forms.OpenFileDialog]::New()
    $ofd.Multiselect = $true

    Files can be selected as they are in File Explorer.  You can set a file template to select by type and you will re4turn a list of files tthat have been selected.  Anything more complex will require shell programming with a compiled language.


    Friday, October 25, 2019 7:45 PM
  • I think I may of over complicated my request.

    Can you be in Window 10 File Explorer manually select 4 files then initiate a script to copy to another location?

    Yes. Just add a SendTo to the context menu that is the target folder.  Select your files and select "SendTo" and find the folder in the list.  YOu can also use the top menustrip :CopyTo" or "MoveTo".

    You issue is not a script but it is a lack of fundamental Windows experience.  Get the book "Windows 10 For Dummies".  It will teach you all about File Explorer and how to navigate and use Windows.

    Post questions about how to use basic Windows to the Windows end users forums at http://answers.microsoft.com Until you leaarnbasic Windows you should just abandon any consideration about scripting as scripting requires that you have this knowledge in advance.  With it you will not know what to script or how to find answers. 


    Friday, October 25, 2019 7:51 PM