Batch move multiple files via cmd?

0080900

Member
Member
Messages
13
I have: x4 .gif images, x14 .jpg images, and x5 .png images in my
Code:
C:\Users\SampleUser\Downloads\img14
folder and want to move them to these desired locations via cmd.

Move the x4 .gif images to:
Code:
C:\Users\SampleUser\Downloads\img14\.gif

Move the x14 .jpg images to:
Code:
C:\Users\SampleUser\Downloads\img14\.jpg

Move the x5 .png images to:
Code:
C:\Users\SampleUser\Downloads\img14\.png

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 Computer

System One

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


Code:
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:
Code:
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:

My Computer

System One

  • OS
    Windows 8 Pro x64
    Computer type
    Laptop
    System Manufacturer/Model
    HP Pavilion dv7t (17.3'', i7-2630QM, HD 6770M 1Gb, 8Gb RAM, 2 SSD@120Gb + 1 HDD@750Gb)
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.

MoveCopyMultiFilesToOneDir.png

The "program" can be edited using Notepad.
All cretids is to Panayot Karabakalov.
 

Attachments

  • CopyMovesMultiFilesInOneDir.zip
    2.9 KB · Views: 248

My Computer

System One

  • OS
    Windows 8 Pro
    CPU
    Athlon II X3 455
    Motherboard
    Asrock 880GMH US3S
    Memory
    8 GB
    Graphics Card(s)
    Gainward GT440 1GB GDDR5
    Monitor(s) Displays
    Benq G2220HDA
    Screen Resolution
    1920x1080
    Hard Drives
    Excelstor 40 GB ATA100
    Hitachi 200GB ATA 133
    Seagate Baracuda 2TB SATA2
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.

miauu -
That is a great program, thanks for posting it, I collect little utilities like this, they ALWAYS come in handy.
 

My Computer

System One

  • OS
    Windows 8 Pro with Media Center/Windows 7
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Asus M2N-MX SE Plus § DualCore AMD Athlon 64 X2, 2300 MHz (11.5 x 200) 4400+ § Corsair Value Select
    CPU
    AMD 4400+/4200+
    Motherboard
    Asus M2N-MX SE Plus/Asus A8M2N-LA (NodusM)
    Memory
    2 GB/3GB
    Graphics Card(s)
    GeForce 8400 GS/GeForce 210
    Sound Card
    nVIDIA GT218 - High Definition Audio Controller
    Monitor(s) Displays
    Hitachi 40" LCD HDTV
    Screen Resolution
    "1842 x 1036"
    Hard Drives
    WDC WD50 00AAKS-007AA SCSI Disk Device
    ST1000DL 002-9TT153 SCSI Disk Device
    WDC WD3200AAJB-00J3A0 ATA Device
    WDC WD32 WD-WCAPZ2942630 USB Device
    WD My Book 1140 USB Device
    PSU
    Works 550w
    Case
    MSI "M-Box"
    Cooling
    Water Cooled
    Keyboard
    Dell Keyboard
    Mouse
    Microsoft Intellimouse
    Internet Speed
    Cable Medium Speed
    Browser
    Chrome/IE 10
    Antivirus
    Eset NOD32 6.x/Win Defend
    Other Info
    Recently lost my Windows 8 on my main PC, had to go back to Windows 7.
Back
Top