Link to home
Start Free TrialLog in
Avatar of qt3dot14
qt3dot14

asked on

invalid parameter using icacls in command prompt

im trying to delete a file (folder actually) from my computer - vista o/s.

im getting a "destination folder access denied" error message.

i went to command prompt and used the "takeown" command to take ownership and got this message:

success:  the file <or folder>: "c:\downloads\myfolder" now owned by user "myname-pc\myname".

now im trying to use the icacls command to assign full access so i can delete the folder but i keep getting an "invalid parameter" error message referring to the user name.

attempted command/syntax is as follows:

c:\downloads>icacls myfolder/g myname-pc\myname:f

which brings error message: invalid parameter myname-pc\myname:f

and

c:downloads>icacls myfolder/g myname-pc\myname: f

which brings error message: invalid parameter myname-pc\myname:

is my syntax incorrect or is there something about the user name or something else?

fyi:  commands under command prompt were run as administrator.

in the infamous words of christine mcvie:  "im over my head....."

help.
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Please try
ICACLS myfolder /grant administrators:F /t
Avatar of qt3dot14
qt3dot14

ASKER

i tried your suggestion and it worked to a point.  after running the command i got a message that said something to the effect of "items successfully processed 124, items failed to process 0".

but when i try to delete the folder i still get the "destination folder access denied" error message.

i cant delete the folder, i cant rename the folder and i can open the folder to see its contents but i cant execute anything in the folder.

any suggestions?
The command you ran gave the group "administrators" full access rights on that folder. Is the user account you're running an administrator account? If not, switch to an administrator account and you should be able to delete the folder.

Or, run
ICACLS myfolder /grant myname-pc\myname:F /t
to give full access to the user "myname-pc\myname"

Or, from an elevated command prompt, run

rmdir C:\downloads\myfolder /S
im running under an admin account.  

just to be thorough i ran command prompt with a right-click <run as administrator>.

i tried both of the above commands and they both seemed successful but i still get the "destination folder access denied" error message.

if this helps:  the folder is actually called techtools and was installed by avast online during a "computer clean-up" session.  they didnt delete the folder before they logged out.

also, do i need to be restarting my computer at any point during this process?  i dont think so but its better to ask.

i will be out of town for a few days so i wont be able to respond to your comments for those days.  so dont think ive abandoned this question.  i have this, or a similar issue, on a few other files stored on a zip drive so i definitely want to find out the answer.  

also, when i get back, if you need any screen shots to help facilitate this process i'll be happy to provide those.

thanx for you help so far.
When you ran the last command (rmdir) you did not get an error message? Cause that command deletes the folder, but that won't reflect on Windows Explorer until you hit F5.

When you return, please post the following screenshots of the techtool folder properties:
1. the general properties page (right click->properties)
2. the security properties page (right click->properties->security)
3. the advanced security permissions page (right click->properties->security->advanced)
4. the advanced security owner page (right click->properties->security->advanced->owner)

This should help clear the issue.

A reboot might help if Avast or another program still uses this folder.
That might explain why you can't delete it.
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
when i try to delete folder i get the "destination folder access denied" message, as i previously stated.

as of this moment i have decided that i would rather just change the name of the folder and move it to another location.

when i try to rename the folder i get the same "destination folder access denied" message.  so there is some type of ownership problem.

i have restated all this so that you understand that i would prefer to take ownership/control of the file without deleting the file thru the command prompt.

that being said i will now attempt to provide you with the screen shots so that i can call upon your expertise to help me achieve my goal.

screenshots are in the attached wordpad file.

thanx again for the help.

update:  it is not letting me upload the wordpad file, so im going to post this message and then try to upload the file on a follow-up message.
Did you try the command from my previous post?

TAKEOWN /f c:\downloads\techtools /r /d y

What was the result?
im in north carolina and its late and im fading fast.

ill try that first thing in the morning and let you know what happens.  if that command doesnt work ill try to re-post the screen shots that i cant get uploaded at the moment.

thanx.
my computer has crashed so the answer to this question is moot at the moment.  if i get it back running i will re-contact you to pursue the issue further.  thanx for your help dan.