Jump to content

Trying To Remove Dir


Recommended Posts

im trying to delete a folder AND its contents within @UserProfileDir but it doesn't work--nothing gets deleted. i've tried several combinations but nothing works, any ideas?

DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)

Any help would be greatly appreciated! :D

Edited by gcue
Link to comment
Share on other sites

It works for me, so are you sure the folder name is correct (I don't have Roxio installed so I changed to something I did have installed)?

Also, you should be able to just use @ProgramsDir & "\folder".

Link to comment
Share on other sites

yea its spelt exactly the same (copied pasted)

cool hadnt noticed i could use @ProgramsDir

anyway, tried this to and it didnt work.. :D

DirRemove(@ProgramsDir & "\Roxio Easy CD Creator 5", 1)

Link to comment
Share on other sites

nope.

i think the problem may be that my profile has a number attached to it. username.001 (we have problems with roaming profiles on our network)

maybe i can try @userprofile.001

lol

Link to comment
Share on other sites

nope.

i think the problem may be that my profile has a number attached to it.  username.001  (we have problems with roaming profiles on our network)

maybe i can try @userprofile.001

lol

odd, but possible, why not try popping the @userprofile into a msgbox to see what's being returned?

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

I always check for a known file in the dir then use

If FileExists(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5\Known file.* ) Then

Do

DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)

Until 1

EndIf

Edited by bshoenhair
Link to comment
Share on other sites

I always use

Do

  DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)

Until 1

pardon me, I don't understand.

(yes, it is taking all my strength to not be cruel and I understand sometimes we hit post before we mean it, or your grip on the english language may not be the best, I just don't understand what you mean... the example of msgbox you used has several things wrong with it that I are detailed both in the function reference for msgbox and faq 9 that if you're saying you always use the help file, it doesn't look like it... forgive me, that just came out.)

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

emmanuel

the example of msgbox you used

What are you talking about if you look at your quote there is no msgbox in it

(yes, it is taking all my strength to not be cruel and I understand sometimes we hit post before we mean it, or your grip on the english language may not be the best,

Don't get me started, seems you need to read alittle before making a post !!!

The only MsgBox I see is four posts up by another user, whats up with that ?

Maybe you need to get closer to the monitor like your avatar picture is, just kidding, lighten up buddy.

Edited by bshoenhair
Link to comment
Share on other sites

this is what I was talking about when I was refering to the faq and msgbox.

MsgBox("@UserProfileDir", "")  ??

when I quoted:

I always use

Do

DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)

Until 1

that's all that was there.

Don't get me started, seems you need to read alittle before making a post.

you mean I should wait till you edit your post at least once before I reply? (just noticed as I'm writing this that you've edited the reply that I'm already replying to)

lightening up:

sigh. ok, I wasn't replying to bshoenhair when I wrote my rtfm comment, I was replying to gcue, as would make sense by it following directly after it the message with the msgbox line that needed some help... and yeah, I did slip-up and get confused, I read it as a conversation and took bshoenhair's "I always use..." as a natural continuation on what gcue had said, I apologize for not catching that...

and just to clear anything else up, "fer crying out loud" is meant in good humor.

oh fer crying out loud.

edit to fix my messed up quote boxes

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

you mean I should wait till you edit your post at least once before I reply?

No, what I was saying you should reply with proper content to the proper user. I knew that you made a mistake but I wanted to clarify it and clear my name. I make mistakes all the time and hopefuly there are not hard feelings against me pointing this out.

Link to comment
Share on other sites

No, what I was saying you should reply with proper content to the proper user. I knew that you made a mistake but I wanted to clarify it and clear my name. I make mistakes all the time and hopefuly there are not hard feelings against me pointing this out.

definately no hard feelings... it's always too easy to mis-understand with text only interaction...

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

  • Administrators

Are you sure the shortcuts are in the users start menu or are they in "All Users"?

(in which case use @ProgramsCommonDir instead of @ProgramsDir)

Something like this may help:

MsgBox(0, "@ProgramsDir is currently:", @ProgramsDir)
$result = DirRemove(@ProgramsDir & "\Roxio Easy CD Creator 5", 1)
MsgBox(0, "Result of DirRemove operation was:", $result)

Edited by Jon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...