Aristos Vasiliou | 12 Jul 2009 18:41
Favicon

RE: Cannot delete empty folder for some reason

As always, you're the best Mic :)

Thanks

________________________________

From: batchworld@... on behalf of foxidrive
Sent: Sun 7/12/2009 6:23 PM
To: batchworld@...
Subject: Re: [BATCH WORLD] Cannot delete empty folder for some reason

On Sun, 12 Jul 2009 12:17:29 +0300, "Aristos Vasiliou"
<aristos@... <mailto:aristos%40aristos.net> > wrote:

>I am using this batch file to create another batch file in %tmp% which will delete "C:\webserver"
>
>>"%TMP%.\Uninstall_EasyWebServer.cmd" ECHO. <at> ECHO off
>>>"%TMP%.\Uninstall_EasyWebServer.cmd" ECHO RD /S /Q "%HOMEDRIVE%\webserver"
>>>"%TMP%.\Uninstall_EasyWebServer.cmd" ECHO ECHO Easy Web Server was successfully removed from your computer
>>>"%TMP%.\Uninstall_EasyWebServer.cmd" ECHO PAUSE
>cd /d "%TMP%"
>"%TMP%.\Uninstall_EasyWebServer.cmd"
>
>My problem is that the batch file created in %tmp% cannot delete "C:\webserver" and the error message is
"The process cannot access the file because it is being used by another process." Which is weird because
C:\webserver is just an empty folder.
>
>So I downloaded Process Monitor to see which process is keeping C:\webserver in use and found that no
process is keeping that folder in use.
>
>Do you see anything in that batch file that could be causing this problem?
>
>Thanks

%temp% is normally the place rather than %tmp% 

There may be a permissions issue because it is in the root of C: but try
this batch file to see if it works on your PC. It works here in XP.

 <at> echo off
md "%HOMEDRIVE%\webserver"
cd /d "%HOMEDRIVE%\webserver"
dir
set file="%TEMP%.\Uninstall_EasyWebServer.cmd"
> %file% ECHO. <at> ECHO off
>> %file% ECHO RD /S /Q "%HOMEDRIVE%\webserver"
>> %file% ECHO ECHO Easy Web Server was successfully removed from your computer
>> %file% ECHO PAUSE
cd /d "%TEMP%"
dir "Uninstall_EasyWebServer.cmd"
"Uninstall_EasyWebServer.cmd"

[Non-text portions of this message have been removed]

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/batchworld/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:batchworld-digest@... 
    mailto:batchworld-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    batchworld-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Gmane