| Windows 7: how to robocopy files with similar names |
09 Apr 2012
|
#1 | | |
how to robocopy files with similar names Hello all,
I need to robocopy many files which starts with the same name for Example (Ari, Arit, Ariel, Arik, Aris)
I tried robocopy source_file\ari*.* destination_file\ari*.* however it is nto working do someone can help with that.
Thanks Orfi | My System Specs |
| |
09 Apr 2012
|
#2 | | Windows 7 Ultimate SP1 (x64) South Australia |
Hi,
Your syntax is a bit out. Try this: Code: robocopy E:\Test\ Ari* F:\Test\ /e /mir Regards,
Golden | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Golden Mk. I.3 OS Windows 7 Ultimate SP1 (x64) CPU Intel i7 860 @ 2.80 GHz Motherboard Gigabyte P55A-UD3R Rev.1. Award BIOS F13 Memory 16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24) Graphics Card EVGA NVidia GTX 560 1024MB Sound Card Realtek Integrated Monitor(s) Displays Dual Samsung SyncMaster 2494HS Screen Resolution 1920*1080 and 1920*1080 Keyboard Logitech G110 Mouse Logitech MX518 PSU Thermaltake ToughPower QFan 750W Case Thermaltake Element S VK60001W2Z Cooling Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans Hard Drives 1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
3*Samsung F1 SpinPoint 1TB in RAID5;
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0 Internet Speed Not fast enough!!! Antivirus MSE and Malwarebytes Pro Browser Chrome Version 25 Other Info Laptop: ASUS X54C, Intel Core i3-2330M @ 2.0Ghz, 4GB RAM, Intel HD on-board graphics, Windows 7 Professional SP1 (x64), LinuxMint 14 (x64), PepperMint 3 (x86) |
09 Apr 2012
|
#3 | | |
Wildcards don't work with robocopy. You'll have to use xcopy, which is also built in. | My System Specs | | OS XP / Win7 x64 Pro CPU Intel Quad-Core Q9450 @ 3.2GHz Motherboard Asus P5-E Memory 2x2GB GSkill DDR2 Graphics Card NVIDIA GeForce 8600 GTS (EVGA) Monitor(s) Displays Dell 2408WFP Screen Resolution 1920x1200 |
09 Apr 2012
|
#4 | | Windows 7 Ultimate SP1 (x64) South Australia |
Hi FliGi7,
It is possible to use wildcards, but I agree its less intuitive than copy or xcopy - the trick is to include a space between the source and wildcarding.
Additionally, there is an exclude option (/XF) that will exclude files based on paths/names and a series of wildcards.
Regards,
Golden | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Golden Mk. I.3 OS Windows 7 Ultimate SP1 (x64) CPU Intel i7 860 @ 2.80 GHz Motherboard Gigabyte P55A-UD3R Rev.1. Award BIOS F13 Memory 16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24) Graphics Card EVGA NVidia GTX 560 1024MB Sound Card Realtek Integrated Monitor(s) Displays Dual Samsung SyncMaster 2494HS Screen Resolution 1920*1080 and 1920*1080 Keyboard Logitech G110 Mouse Logitech MX518 PSU Thermaltake ToughPower QFan 750W Case Thermaltake Element S VK60001W2Z Cooling Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans Hard Drives 1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
3*Samsung F1 SpinPoint 1TB in RAID5;
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0 Internet Speed Not fast enough!!! Antivirus MSE and Malwarebytes Pro Browser Chrome Version 25 Other Info Laptop: ASUS X54C, Intel Core i3-2330M @ 2.0Ghz, 4GB RAM, Intel HD on-board graphics, Windows 7 Professional SP1 (x64), LinuxMint 14 (x64), PepperMint 3 (x86) |
10 Apr 2012
|
#5 | | |
almost there Golden thank you for the help, however if I will have space between the
E:\Test\ Ari.
Directory test to Ari it is copying all the folders that I have in folder test.
Any thoughts.
Orfi | My System Specs | | |
10 Apr 2012
|
#6 | | |
You might have to try it specifically as Golden described. You're missing the "*" in the command in your post.
It would be helpful if you posted the whole command line you're using... | My System Specs | | OS Windows 7 Ultimate x64 |
10 Apr 2012
|
#7 | | Windows 7 Ultimate SP1 (x64) South Australia |
Hi,
If you mean its copying all the files, instead of just those starting with the characters Ari, then include the * as sibbil mentioned.
If you mean its copying all the folders, then you can use the /XD switch to exclude specific folders.
I agree with sibbil, its far easier to help you if you post exactly the command line you are using.
Regards,
Golden | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Golden Mk. I.3 OS Windows 7 Ultimate SP1 (x64) CPU Intel i7 860 @ 2.80 GHz Motherboard Gigabyte P55A-UD3R Rev.1. Award BIOS F13 Memory 16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24) Graphics Card EVGA NVidia GTX 560 1024MB Sound Card Realtek Integrated Monitor(s) Displays Dual Samsung SyncMaster 2494HS Screen Resolution 1920*1080 and 1920*1080 Keyboard Logitech G110 Mouse Logitech MX518 PSU Thermaltake ToughPower QFan 750W Case Thermaltake Element S VK60001W2Z Cooling Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans Hard Drives 1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
3*Samsung F1 SpinPoint 1TB in RAID5;
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0 Internet Speed Not fast enough!!! Antivirus MSE and Malwarebytes Pro Browser Chrome Version 25 Other Info Laptop: ASUS X54C, Intel Core i3-2330M @ 2.0Ghz, 4GB RAM, Intel HD on-board graphics, Windows 7 Professional SP1 (x64), LinuxMint 14 (x64), PepperMint 3 (x86) |
10 Apr 2012
|
#8 | | |

Quote: Originally Posted by Orfi Directory test to Ari it is copying all the folders that I have in folder test. I think you might be saying that it's coping the subfolders as well and if they don't have a matching file you end up with a empty folder.
Try this instead Code: robocopy E:\Test\ Ari* F:\Test\ /s | My System Specs | | System Manufacturer/Model Number Self built OS Windows 7 Ultimate x64 CPU Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC) Motherboard Asus P5Q-E Memory Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4) Graphics Card Palit GeForce GTS 250 (1024MB) Sound Card On Board (ADI AD2000B 8ch HD) Monitor(s) Displays Samsung 32in LCD TV Screen Resolution 1360x768 Keyboard Logitech MX5000 Laser (Combo) Mouse Logitech MX5000 Laser (Combo) PSU 550W Antec Neo HE 550 Case Antec P180 Cooling Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans Hard Drives 2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures) Internet Speed ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up) Other Info Gigabyte GN-WP01GS 54g Wireless Lan Card |
13 Apr 2012
|
#9 | | |

Quote: Originally Posted by Golden Hi FliGi7,
It is possible to use wildcards, but I agree its less intuitive than copy or xcopy - the trick is to include a space between the source and wildcarding.
Additionally, there is an exclude option (/XF) that will exclude files based on paths/names and a series of wildcards.
Regards,
Golden Wow, totally didn't know that! I just assumed they didn't work whenever I tried to do something like "C:\Path\*file.*" because it never worked. I wish that "trick" was documented on the man page. They infer that wildcards work like in any other instance, which they obviously do not. | My System Specs | | OS XP / Win7 x64 Pro CPU Intel Quad-Core Q9450 @ 3.2GHz Motherboard Asus P5-E Memory 2x2GB GSkill DDR2 Graphics Card NVIDIA GeForce 8600 GTS (EVGA) Monitor(s) Displays Dell 2408WFP Screen Resolution 1920x1200 |
13 Apr 2012
|
#10 | | |

Quote: Originally Posted by FliGi7 Wow, totally didn't know that! I just assumed they didn't work whenever I tried to do something like "C:\Path\*file.*" because it never worked. I wish that "trick" was documented on the man page. They infer that wildcards work like in any other instance, which they obviously do not. If I do a robocopy/? it specifies a space is required before and after file specification, using wildcards or not. *.* is the default if no file specified.
And I guess the "odd" syntax comes from the program being designed for handling directory replication rather than the typical file manipulation.
Last edited by F5ing; 13 Apr 2012 at 06:34 PM..
Reason: added more info.
| My System Specs | | OS Windows 7 Ultimate x64 how to robocopy files with similar names problems? All times are GMT -5. The time now is 07:43 PM. | |