There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 freeze hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express password printer problem problems router security slow software sound trojan usb virus vista windows windows xp wireless
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Copy Dos Batch File


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
dcouture's Avatar
Junior Member with 2 posts.
 
Join Date: Jan 2007
Experience: Intermediate
20-Jan-2007, 09:32 AM #1
Copy Dos Batch File
Hi, I need help to make a script to copy all my canon .cr2 file (from DCMI\000CANON, 001CAnon, XXXCANON) to another drive and all .cr2 files in the same folder.

Thank you
JohnWill's Avatar
Computer Specs
Moderator with 78,896 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
20-Jan-2007, 12:36 PM #2
I can't tell what the full directory specification is from that post, but the basic form of the copy command is.

COPY <source> <destination>

For example:

COPY "d:\Source Folder Name\Sub Folder Name\*.cr2" "d:\Dest Folder Name\Sub Folder Name\"

Note the quotes surrounding the names, these are mandatory for long file names or names with spaces.
__________________
Microsoft MVP - User Desktop Experience

If you think experts are expensive, wait until you see what amateurs cost you!

Help me out with some details here, I'm brilliant, not clairvoyant!
Frank4d's Avatar
Distinguished Member with 4,405 posts.
 
Join Date: Sep 2006
Location: So. California
Experience: Since MS-Dos 3.0
21-Jan-2007, 11:19 AM #3
I found a batch file here: http://www.lensamalaysia.com/forum/a...hp/t-1702.html that (modified as shown below) will copy all of your canon *.cr2 files from all subfolders in your \DCMI folder into one folder.

Make a batch file named COPYCR2.BAT containing these lines:

@echo off
if "%1" == "" goto err1
if "%2" == "" goto err2
for /R %1 %%f in (*.cr2) do copy "%%f" "%2"
goto ending
:err1
echo Please enter the source directory
goto ending
:err2
echo Please enter the destination directory
:ending

Put the batch file in C:\Windows\system32. To copy all of your *.cr2 files into a new folder named allcr2s, type this at a command prompt:

copycr2 c:\DCMI c:\allcr2s

Edit: You do need to create the destination folder first!
JohnWill's Avatar
Computer Specs
Moderator with 78,896 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
21-Jan-2007, 12:23 PM #4
Just toss in a MD <destination folder> in the front of the batch.
dcouture's Avatar
Junior Member with 2 posts.
 
Join Date: Jan 2007
Experience: Intermediate
21-Jan-2007, 12:40 PM #5
Thank you it work :-)
gurutech's Avatar
Computer Specs
Distinguished Member with 2,261 posts.
 
Join Date: Apr 2004
Location: Central NJ
Experience: Seasoned Professional
29-Jan-2007, 01:49 PM #6
XCOPY is easier, and comes with Windows.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:14 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.