Windows 8 and 8.1 Forums

Batch move multiple files via cmd?

  1. #1

    Batch move multiple files via cmd?

    I have: x4 .gif images, x14 .jpg images, and x5 .png images in my
    folder and want to move them to these desired locations via cmd.

    Move the x4 .gif images to:
    Move the x14 .jpg images to:
    Move the x5 .png images to:
    Does anyone know of a way I can go about this using a single command? Multiple commands will work just fine as well, as long it's not one too many commands.

    OS: Windows 8 Enterprise x64

    Any assistance/help would be greatly appreciated.

      My System SpecsSystem Spec

  2. #2

    Posts : 480
    Windows 8 Pro x64

    Perhaps, it's time to learn PowerShell, since the syntax is easier to read.

    dir -path "C:\Users\SampleUser\Downloads\img14\*" -Include *.jpg | move -destination "C:\Users\SampleUser\Downloads\img14\.jpg\"

    Substitute the extensions to get two other commands.

    If you want CMD, here's a sample command:
    FOR %d IN (dir "C:\Users\SampleUser\Downloads\img14\" /b *.jpg) DO MOVE %d "C:\Users\SampleUser\Downloads\img14\.jpg\"

    Note that this command is for entering in the command prompt. For CMD-files, replace all % with %%
    Last edited by Vadikan; 11 Jun 2013 at 04:29. Reason: added cmd
      My System SpecsSystem Spec

  3. #3

    Antipolo City
    Posts : 14
    Windows 7 - Windows 8

    robocopy anyone?

    In the command prompt (or cmd), just type 'robocopy /?' for help about it (or search about it on the web).
      My System SpecsSystem Spec

  4. #4

    Posts : 30
    Windows 8 Pro

    A while ago I faced the same problem - move files with specific extension from one folder to another. After some fight with robocopy, sync suftware and etc. A friend of mine creates a little "program" that allows me to do what I need.

    Click image for larger version

    The "program" can be edited using Notepad.
    All cretids is to Panayot Karabakalov.
    Batch move multiple files via cmd? Attached Files
      My System SpecsSystem Spec

  5. #5

    Sloe Deth, Californicatia
    Posts : 3,908
    Windows 8 Pro with Media Center/Windows 7

    How about Teracopy? Does it support Command Line?

    Back in the days of Windows 3.1 and Windows 95, there were several times I used Xcopy32 with Switches to copy whole partitions and keep the OS Intact. I've done this about 3 times, I copied a whole Windows 95 installation from one drive to another that way, and the target drive booted. If the commands are still in Windows, you may be able to use them on a smaller scale for Windows 8 - Maybe you can get the commands from a Windows 95 install disk and see if they work. But I am sure Powershell has something that can be used, Powershell is great- Do not fail to learn how to use it for some of your needs.

    That is a great program, thanks for posting it, I collect little utilities like this, they ALWAYS come in handy.
      My System SpecsSystem Spec

Batch move multiple files via cmd?
Related Threads
Can anyone advise on now to move Outlook 2013 PST and OST files to a different location on Windows 8.1? I have tried a number of the publicised methods but with no success.
Hello all, I wondering if anyone can tell me whether or not these batch files that I use to clear the Event Viewer logs and to activate the extended disk cleanup prompt of windows 7 are compatible with Windows 8.1. -Event Viewer log clean up batch file @echo offFOR /F "tokens=1,2*" %%V IN...
Can't move any files? in General Support
I have this strange problem, I can't move files from one destination to another. For example: I have a few files in a folder called New Folder in my documents, I try to drag them out my that folder and directly into my documents so I can remove the folder. But when I drag them into my...
Can't move files? in General Support
I have some files and shortcuts on my desktop, and I am trying to move them into my documents. When I refresh my documents they just disappear and they do not reappear in documents or the desktop. Only when I restart or log out do they reappear on the desktop. Whats causing this?
DOS is not dead, at least not yet for me. However in Windows 8 a useful utility has been has now been lost with the elimination of EDIT.COM. I use batch files for a variety of purposes which are much faster than mousing through a GUI, for example to archive, backup and move files using xcopy and...
Hi, Does anyone know of any tools/utilities that I can use to put a GUI front-end to my Windows scripts (batch commands)? For example, I have a batch file now that takes a password as the parameter and then executes an EXE with that password as its parameter. I'd like to have something like...
What Files to move to HDD from SSD? in Installation & Setup
HI All, HAve just installed Win 8 Pro to a new SSD and have read that to help with the life that frequent rewritten files and folders should be moved to the HDD, Which ones are they referring to and how would I do this? When they say that frequently used applications should go on the SSD what...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook