2
1
Say I have a folder tree such as:
C:\Users\Test\My Documents
C:\Users\Test2
C:\Users\Test3\My Documents
What command can I run to search through C:\Users
to check which sub folders have a My Documents
folder?
So for the above it would come back with:
C:\Users\Test\My Documents
C:\Users\Test3\My Documents
But not
C:\Users\Test2
Also, if I wanted to script renaming any sub folders that are found to be called My Documents
and rename these to just Documents
, how could I achieve this?
Wouldn't
dir /b "My Documents"
work? If not, you can parse itdir /B | findstr /R /C:"My\sDocuments"
... I guess it would work, I don't have Windows installed here. To rename useren
. – Alex – 2013-06-04T11:32:59.557So in this case, you want to rename "Test" to "Documents" or "My Documents" to "Documents"? – tumchaaditya – 2013-06-04T11:37:34.110
maybe this thread is useful for you: http://stackoverflow.com/questions/9271107/bat-file-for-renaming-multiple-folders
– bummi – 2013-06-04T11:55:18.463@tumchaaditya I wanted to rename My Documents to Documents. – Guest23408290 – 2013-06-04T13:14:39.640