[dba-Tech] Command line: move

John Bartow john at winhaven.net
Thu Apr 28 11:49:09 CDT 2011


Hi Tina,
Thanks. I put together a nice system using RoboCopy, which is an awesome
command that I completely missed when it was released! Check it out when you
have some time.

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Tina Norris
Fields
Sent: Thursday, April 28, 2011 11:26 AM
To: Discussion of Hardware and Software issues
Subject: Re: [dba-Tech] Command line: move

John,

I believe I would use the COPY command, or maybe more likely, the XCOPY
command,  to copy my source files to their destination COPY source
destination [/v] or XCOPY source destination [/A][/D][/E][/P][/S][/V][/W]

Options:
/A           Copy only those files with the archive attribute turned on; 
the state of the archive bit is not changed
/D:date    Copy only those files whose date is equal to or later than 
the specified date
/E            Create all subdirectories, even if empty
/M           Copy only those files with the archive attribute turned on: 
the state of the archive bit is turned off
/P            Prompt before copying each file
/S            Copy files in subdirectories
/V            Verify each write operation
/W           Wait until disk is inserted 

Then, I would use the DEL command to delete them from their original
location DEL file-name

To make things work smoothly, I'd probably want all the source files in one
directory, or tree, so I could write something like this:
XCOPY C:\SOURCE\*.*   C:\DESTINATION\  /E /S /V
Followed by:
DEL C:\SOURCE\*.*

At least, that's where I'd start.  I know me, so I'd test it thoroughly
before I relied on it.  :-)

Best,
T


John Bartow wrote:
> Hi all,
> I recall that some of you use the windows command line quite a bit yet.
>
> Can someone tell me what the command line would be to move all folders 
> and files contained in a specific folder to another drive?
>
> It's Something I want to do it a batch files and schedule for 
> archiving purposes.
>
> TIA John B.
>
> _______________________________________________
> dba-Tech mailing list
> dba-Tech at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-tech
> Website: http://www.databaseadvisors.com
>
>   
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com




More information about the dba-Tech mailing list