Page 2 of 2 <12
Topic Options
#198281 - 2010-03-30 05:39 PM Re: Need help Deleting Files out of user profiles [Re: Richard H.]
synwave7 Offline
Fresh Scripter

Registered: 2002-01-27
Posts: 49
Loc: Chicago, IL. 60601
Yes, perhaps your partially correct but not redirection. Theres no roaming profiles, no redirection of any of the profile. HOWEVER - we remap the boot (hard) drive(s). So, in other words rather than C: drive and D: drive we remap C: drive to Q: drive and D: drive to R: drive

1. Windows 2003 SP2
2. 32 bit
3. I get a lot of

"Deleting file: filenamehere.pdf, RESULT: FAILED with error [5] Access is denied."

over and over for each and every file the code finds.

Syn
_________________________
Bang that head that doesn't bang!!!

Top
#198289 - 2010-03-31 12:45 PM Re: Need help Deleting Files out of user profiles [Re: synwave7]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Presumably when you delete one of these files through explorer you don't get a prompt (other than the basic "are you sure").

A couple of things to try:
Take one of the files that is failing, open a command prompt and try to delete it using the full path, see if the delete works at the command line.

Try adding the "force" flags to the del command and see if it helps:
 Code:
Del $sPrefix+$sEntry+$sSuffix+$sFileToDelete /f /h


If that doesn't work then maybe follow the path of least resistance and get the users to delete their own files in their startup script.

Top
#198294 - 2010-03-31 03:27 PM Re: Need help Deleting Files out of user profiles [Re: Richard H.]
synwave7 Offline
Fresh Scripter

Registered: 2002-01-27
Posts: 49
Loc: Chicago, IL. 60601
Richard,
Ahh yes the /f switch worked like a charm. All is good now. Sorry for the confusion I should have thought of that. Thanks again and again and again to you and Mart for the help!!!!

Syn
_________________________
Bang that head that doesn't bang!!!

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2419 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.057 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org