Answered by:
Search for a file in subfolders and delete it

Question
-
Hi,
I need to delete the MSMAPI32.DLL from following folders for the error "Either there is no default mail client or the current mail client cannot fulfil the messaging request".
Please help me to provide a batch file which will find the MSMAPI32.DLL file under C:\Program Files\Common Files\System\MSMAPI and delete it.
C:\Program Files\Common Files\System\MSMAPI\1028\
C:\Program Files\Common Files\System\MSMAPI\1030\
C:\Program Files\Common Files\System\MSMAPI\1033\
C:\Program Files\Common Files\System\MSMAPI\1031\
C:\Program Files\Common Files\System\MSMAPI\1034\
C:\Program Files\Common Files\System\MSMAPI\1035\
C:\Program Files\Common Files\System\MSMAPI\1036\
C:\Program Files\Common Files\System\MSMAPI\1040\
C:\Program Files\Common Files\System\MSMAPI\1041\
C:\Program Files\Common Files\System\MSMAPI\1042\
C:\Program Files\Common Files\System\MSMAPI\1043\
C:\Program Files\Common Files\System\MSMAPI\1046\
C:\Program Files\Common Files\System\MSMAPI\1053\
C:\Program Files\Common Files\System\MSMAPI\2052\
Regards,
Boopathi S
- Moved by Just Karl Friday, January 9, 2015 6:17 PM Looking for the proper forum.
Friday, January 9, 2015 5:23 PM
Answers
-
Hello,
try this:
<snip>
Karl
I'd add a /q switch to each del command as well.
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Friday, January 9, 2015 6:27 PM -
Hello,
try this:
del C:\Program Files\Common Files\System\MSMAPI\1028\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1030\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1033\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1031\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1034\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1035\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1036\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1040\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1041\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1042\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1043\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1046\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1053\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\2052\MSMAPI32.DLL
KarlWhen you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Edited by Just Karl Friday, January 9, 2015 6:17 PM
- Proposed as answer by Mike Laughlin Friday, January 9, 2015 6:27 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:48 PM
Friday, January 9, 2015 6:16 PM -
Hello,
By the way, the proper place to ask is The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by Mike Laughlin Friday, January 9, 2015 6:27 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:48 PM
Friday, January 9, 2015 6:17 PM
All replies
-
Hello,
The Windows Desktop Perfmon and Diagnostic tools forum is to discuss performance monitor (perfmon), resource monitor (resmon), and task manager, focusing on HOW-TO, Errors/Problems, and usage scenarios.
As the question is off topic here, I am moving it to the Where is the Forum... forum.Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Friday, January 9, 2015 6:14 PM -
Hello,
try this:
del C:\Program Files\Common Files\System\MSMAPI\1028\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1030\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1033\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1031\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1034\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1035\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1036\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1040\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1041\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1042\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1043\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1046\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\1053\MSMAPI32.DLL del C:\Program Files\Common Files\System\MSMAPI\2052\MSMAPI32.DLL
KarlWhen you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Edited by Just Karl Friday, January 9, 2015 6:17 PM
- Proposed as answer by Mike Laughlin Friday, January 9, 2015 6:27 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:48 PM
Friday, January 9, 2015 6:16 PM -
Hello,
By the way, the proper place to ask is The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by Mike Laughlin Friday, January 9, 2015 6:27 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:48 PM
Friday, January 9, 2015 6:17 PM -
Hello,
try this:
<snip>
Karl
I'd add a /q switch to each del command as well.
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Friday, January 9, 2015 6:27 PM -
I'd add a /q switch to each del command as well.
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Friday, January 9, 2015 7:10 PM