RE: file searching and copying

2011-07-21 Thread Andrew S. Baker
Hey, Scott 1. I left it there so the IP could see it run and decide how to use the data. 2. Possibly, but it was quick and dirty. Doesn't hurt with the p 3. Yes it does, and I forgot to remove that. Interestingly enough, it only causes a problem undoubtedly after the drive letter. Elsewhere

Re: file searching and copying

2011-07-21 Thread Jeff Bunting
. ** ** Thanks for the script though, it was fun to digest J ** ** *From:* Andrew S. Baker [mailto:asbz...@gmail.com] *Sent:* Wednesday, July 20, 2011 3:06 PM *To:* NT System Admin Issues *Subject:* Re: file searching and copying ** ** How long are the paths? There are other

Re: file searching and copying

2011-07-21 Thread Andrew S. Baker
though, it was fun to digest J ** ** *From:* Andrew S. Baker [mailto:asbz...@gmail.com] *Sent:* Wednesday, July 20, 2011 3:06 PM *To:* NT System Admin Issues *Subject:* Re: file searching and copying ** ** How long are the paths? There are other ways to handle this, btw

Re: file searching and copying

2011-07-21 Thread Jeff Bunting
Thanks much Andrew, your script was helpful indeed! Jeff On Thu, Jul 21, 2011 at 8:53 AM, Andrew S. Baker asbz...@gmail.com wrote: Hey, Scott 1. I left it there so the IP could see it run and decide how to use the data. 2. Possibly, but it was quick and dirty. Doesn't hurt with the p

RE: file searching and copying

2011-07-21 Thread Michael B. Smith
+1 Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Andrew S. Baker [mailto:asbz...@gmail.com] Sent: Thursday, July 21, 2011 10:53 AM To: NT System Admin Issues Subject: Re: file searching and copying /E implies /S Out of habit I put them both, all

RE: file searching and copying

2011-07-20 Thread Joseph L. Casale
Powershell! What's an example of your need? From: Jeff Bunting [mailto:bunting.j...@gmail.com] Sent: Wednesday, July 20, 2011 10:01 AM To: NT System Admin Issues Subject: file searching and copying I'm attempting to search for particular words in a directory name (must use wildcards!), and, if

RE: file searching and copying

2011-07-20 Thread Crawford, Scott
For /f tokens=* %i in ('dir *WORDS_TO_SEARCH* /s/a/b/ad') do robocopy /mir %i DESTINATION_PATH This will search a folder tree for directorys. Change the dir command to eliminate the /s if you only want to search the root. From: Jeff Bunting [mailto:bunting.j...@gmail.com] Sent: Wednesday,

Re: file searching and copying

2011-07-20 Thread Andrew S. Baker
You're going to have to script that, certainly. You could use robocopy or xcopy or do the whole thing in powershell, but no native tool provides the logic you want without some form of scripting. For instance, assuming that you were going to start in the C:\TEMP folder, and search for

Re: file searching and copying

2011-07-20 Thread Andrew S. Baker
Good one, Scott. Jeff, remember to add a % to each variable if used in a batch file, vs the command line. * * *ASB* *http://about.me/Andrew.S.Baker* *Harnessing the Advantages of Technology for the SMB market… * On Wed, Jul 20, 2011 at 12:13 PM, Crawford, Scott crawfo...@evangel.eduwrote:

RE: file searching and copying

2011-07-20 Thread Crawford, Scott
System Admin Issues Subject: Re: file searching and copying Good one, Scott. Jeff, remember to add a % to each variable if used in a batch file, vs the command line. ASB http://about.me/Andrew.S.Baker Harnessing the Advantages of Technology for the SMB market... On Wed, Jul 20, 2011 at 12

Re: file searching and copying

2011-07-20 Thread Jeff Bunting
Thanks all. Scott's suggestion is close and at least got me pointed in the right direction. Some of the paths are too long for DIR which throws a wrench in the works, so I'm going to have to rely on windows search for now. Powershell, unfortunately, currently isn't an option. Jeff On Wed, Jul

Re: file searching and copying

2011-07-20 Thread Jeff Bunting
:* Wednesday, July 20, 2011 11:23 AM *To:* NT System Admin Issues *Subject:* Re: file searching and copying ** ** Good one, Scott. Jeff, remember to add a % to each variable if used in a batch file, vs the command line. *ASB* *http://about.me/Andrew.S.Baker* *Harnessing

RE: file searching and copying

2011-07-20 Thread Crawford, Scott
\path\to\root to trim a bunch off the length. From: Jeff Bunting [mailto:bunting.j...@gmail.com] Sent: Wednesday, July 20, 2011 1:25 PM To: NT System Admin Issues Subject: Re: file searching and copying Thanks all. Scott's suggestion is close and at least got me pointed in the right direction

Re: file searching and copying

2011-07-20 Thread Andrew S. Baker
How long are the paths? There are other ways to handle this, btw... Try the following snippet. It should handle long folders even if Windows complains about them @echo off SETLOCAL ENABLEDELAYEDEXPANSION SET @SOURCE=%SystemDrive% SET @DEST=D:\SomePlace SET @FIND=PrivacIE :Main for /f

RE: file searching and copying

2011-07-20 Thread Crawford, Scott
: Re: file searching and copying How long are the paths? There are other ways to handle this, btw... Try the following snippet. It should handle long folders even if Windows complains about them @echo off SETLOCAL ENABLEDELAYEDEXPANSION SET @SOURCE=%SystemDrive% SET @DEST=D:\SomePlace SET

RE: file searching and copying

2011-07-20 Thread Crawford, Scott
System Admin Issues Subject: RE: file searching and copying Nice to see pushd and popd making an appearance :) Few nits and questions, just to make sure I'm not missing something: 1. The echo in front of xcopy shouldn't be there. I'm sure it's just there for troubleshooting and left