Command prompt set

XCOPY c:\*.sql   N:\SQL\  /s /f /h /k /o /x 

XCOPY c:\*.bat   N:\SQL\  /s /f /h /k /o /x 

XCOPY c:\*.cmd   N:\SQL\  /s /f /h /k /o /x 

 

That will get you the files into the new location, but within the original
folder structure

 

Then use windows explorer (or similar facility) to show all the files in the new
folder structure, and drag'drop the listed files into the top level folder.

 

Possible problems - files with long names where the addition of the new folder
location makes the names too long

 

Also - check if all the options shown are actually wanted.  

 

JimB

 

From: [email protected] [mailto:[email protected]] On
Behalf Of David McSpadden
Sent: Monday, August 03, 2015 8:08 PM
To: '[email protected]'
Subject: [NTSysADM] RE: Script (VB) or powershell

 

?

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Damien Solodow
Sent: Monday, August 03, 2015 3:05 PM
To: [email protected]
Subject: [NTSysADM] RE: Script (VB) or powershell

 

Could just do that with robocopy.

 

DAMIEN SOLODOW

Senior Systems Engineer

317.447.6033 (office)

317.447.6014 (fax)

HARRISON COLLEGE

 

From: [email protected] [mailto:[email protected]] On
Behalf Of David McSpadden
Sent: Monday, August 3, 2015 3:01 PM
To: ntsysadm <[email protected]>
Subject: [NTSysADM] Script (VB) or powershell

 

Anyone have a good script to go through all directories on a volume and move to
a network or flash drive?

Specifically I want a script that can grab all .sql or .bat's from my machine
and move them to a network folder called N:\SQL\  ???

 

 

David McSpadden

Systems Administrator

Indiana Members Credit Union

P: 317.554.8190 | F: 317.554.8106

 <http://imcu.com/> Description: imcu email icon
<https://www.facebook.com/IndianaMembersCU> Description: facebook email icon
<https://twitter.com/IndMembersCU> Description: twitter email icon

 

Description: email logo

mcp2

 

This e-mail and any files transmitted with it are property of Indiana Members
Credit Union, are confidential, and are intended solely for the use of the
individual or entity to whom this e-mail is addressed. If you are not one of the
named recipient(s) or otherwise have reason to believe that you have received
this message in error, please notify the sender and delete this message
immediately from your computer. Any other use, retention, dissemination,
forwarding, printing, or copying of this email is strictly prohibited.

 

Please consider the environment before printing this email.

This e-mail and any files transmitted with it are property of Indiana Members
Credit Union, are confidential, and are intended solely for the use of the
individual or entity to whom this e-mail is addressed. If you are not one of the
named recipient(s) or otherwise have reason to believe that you have received
this message in error, please notify the sender and delete this message
immediately from your computer. Any other use, retention, dissemination,
forwarding, printing, or copying of this email is strictly prohibited.

 

Please consider the environment before printing this email.


Reply via email to