Locate a subdirectory w dos script and move

Solved/Closed
NM - Feb 23, 2010 at 10:23 AM
 NM - Feb 24, 2010 at 07:53 AM
Hello,


I'm trying to locate a folder within a subdirectory and then move the contents of that folder to a
different location. I've successfully found the folder using "dir /s", but am unfamiliar on how to
get the absolute path to do the move.

Any thoughts or suggestions on how to accomplish this?

Thx,
NM
Related:

3 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 23, 2010 at 02:16 PM
dir /s /b will give you absolute path
0
The /b /s does give me what I need.

On a slightly different issue, I thought the /s should only search the existing directory
and subdirectories. It seems to be searching through \root.
Is there a way to limit this to just within a specific folder?

thx,
Nitesh
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 24, 2010 at 04:11 AM
It does search from the target folder and then deeper. I think you are saying dir c:\ /s /b which is saying that go to c: and starting seeking dirs. you can tell it what the start point is like dir c:\windows\ /s /b
0
thx - that improved my search time drastically. Much appreciated.
0