Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a problem using del and taskkill.

del D:\New Folder.exe

I tried changing the code to this:

del D:\"New Folder.exe"

That didn't work

So I tried this:

del "D:\New Folder.exe"

Still not working. But this is working:

del "D:\New Folder"

The problem is I must remove the .exe to make this work.

And I have this problem too:

taskkill /F/IM New Folder.exe
share|improve this question

closed as off-topic by Nathan C, TheCleaner, Ward, mdpc, Falcon Momot Feb 9 '14 at 13:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – mdpc, Falcon Momot
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Do you get error messages from any of those commands? Do you have a file or folder called New Folder.exe on your D: drive? Also, please ask any unrelated questions you have in a separate question here on StackExchange. –  Ladadadada Jan 28 '14 at 15:19
    
hi that problem has been fixed tnx i will post them on there i didnot know . –  hunter Jan 28 '14 at 15:22

1 Answer 1

up vote 3 down vote accepted

Your del "D:\New Folder.exe" should work just fine...I've tested it just now multiple times. If it isn't working then you need to post the error code/message you are getting.

Same goes for your taskkill command, and your access denied in the attrib command.

The last two could possibly be related to UAC (user account control) issues, but we won't know if you don't post the actual error. Make sure you are running the batch file from an Administrative level command prompt.

Oh, and update your questions tags with more than just batch if you would. Include the specific OS at a minimum.

share|improve this answer
    
HI TNX ITS WORKING NOW(NOT YET TEST THE TASKKILL BUT I THINK THAT WILL WORK TO) ABOUT ATTRIB even when i use Administrative level i have the same problem i test that on win 7 and win xp (vmware)but its not working perhaps its because some of that file i am trying to unhide them are visble or not exist! –  hunter Jan 28 '14 at 15:01
    
You would need to post the existing attribs of the file along with whatever error code you are getting. –  TheCleaner Jan 28 '14 at 15:02
    
attrib -h -S C:*.* i am getting access denid to the files in root of c drive –  hunter Jan 28 '14 at 15:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.