473,761 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to delete Temporary Internet File folder

5 New Member
Alright, here it is I am trying to write a win32 app in VB 2005 to clean up user's profiles. everything works correctly except for the Delete("directo ry", True) statement. I get a System.IO.Direc toryNotFoundExc eption: Could not find a part of the path. Then it gives me a random file name from the UserProfile\Loc al Settings\Tempor ary Internet Files\Content.I E5\SomeRandomFo lder. This is absolutley driving me nuts. So I am gonn give you a basic Pseudo outline, just let me know if you need to see actual code.

Pseudo
1.) User provide the administrator's password, and then the administrator is authenticated against the Active Directory using the provided password.

2.) If authentication is successful another text field is provided to enter the name of the profile to clean i.e. jsmith then after a name is entered a list of computers on the domain is populated.

3.)The user selects multiple PCs from the list and the program runs through each one of the computers in the list and does the following:

a.) pings the computer to see if it is powered on or available if it is the loop is continued, if not the loop restarts with the next PC in the list.

b.) The next step checks the given computer i.e. \\computer name\c$\Documen ts and Settings\ for that particular user's profile folder.

c.) If the profile is found the code loops through each file in the directory and sets the attributes to vbNormal.

d.) The code then loops through each directory (and sub directory) found in the folder and sets the directories and sub directories attributes to vbNormal.

e.) After the attributes are set the directory is deleted (or at least the program attempts to delete the directory) using Directory.Delet e("directory to delete", true) statement.

And that is where I run into trouble, the exception gets caught and throws it out to a dialog box and the program stops. When i go back and check the directory that is supposed to be deleted everything is deleted except for of course the user directory itself and the \Local Settings\Tempor ary Internet Files\Content.I E5 folder and files within those folders. I have tried everything that I can think of, I am logged in as a network administrator on my machine, I have logged onto my machine using the administrator account and run this program and it still does not work. I can delete the files manually through the file explorer and I have checked the permissions on the folders and files and the attributes all are set as they should be (the files or folders are not marked as read only as they were before i started the program so the set attributes is working the way it should, or at least it appears to be working the way it should). I can't think of anything else, so any help would be appreciated and please keep in mind that the last time I messed with Basic there was nothing Visual about it so talk to me as though I'm attending a 101 class.




Thanks in advance,

James T
Heartland, USA
Feb 12 '08 #1
0 2953

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4110
by: David N | last post by:
I got a solution that contains about 30 projects, three of which cannot be open. When I open the project, I always receive the error message "Unable to get the project file from the Web Server" My machine is running Windows 2003. My colleagues are using the same hardware and software as I do, but I am the only one running into this problem. I searched the Internet and see that quite a lot of people having the same problem in the...
3
6129
by: Jim | last post by:
Is it possible to read the Temporary Internet Files folder using C#? I'm messing with FileIO (newbie here) and everything seems to work fine until I try to read the list of files in this Temporary Internet Files folder. I'm only received 1 file when I know there is more. Any suggestions are very appreciated. Thanks
3
3908
by: Rajiv Das | last post by:
VS 2003, XP SP2 ------------------------------------------------------------ DirectoryInfo temporary = new DirectoryInfo( Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)); FileInfo files = temporary.GetFiles(); foreach(FileInfo fi in files) { Console.WriteLine(fi.FullName); }
2
4816
by: TM | last post by:
When I run an ASP.Net application I am getting the following error: "Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged." I checked and made sure the Machine Debug Manager is running on the server, made sure the web.comfit file has debug=true. Mine is: <compilation defaultLanguage="vb" debug="true" /> I also checked the directory executions permissions and it...
0
1683
by: Marc Speed | last post by:
I have a windows server 2003 machine that cannot run any aspx pages. The pages are created on my XP machine and run fine on two other servers but this server keeps giving me the following error: Compiler Error Message: BC31019: Unable to write to output file 'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\xxxxnet\eb34155e\10c7e9e7\hw1yiyhj.dll': The directory name is invalid. I have tried rebooting, restarting...
2
3716
by: yxq | last post by:
Hi, I want to delete the files in "Temporary internet cache" and "History" folder, is it ok to use "File.delete"? What are the true path of "Temporary internet cache" and "History" folder? Thanks
1
4305
by: Manish | last post by:
Hi all, Can any one plz suggest me how i can delete my temporary internet files within my Asp.net page. I am using C# as the code behind lang. Indeed, i have flash inserted on my .net page, which in turn gets its values from the xml file which gets generated at the run time according to the selection of the user in a DropDownList. I want to delete the flash from the "temporary internet files " folder so that on each combobox...
0
12067
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry key 'Temporary (volatile) Jet DSN for process
5
3426
by: rogersw8n | last post by:
Some how, some way the account that creates folders under Temporary Internet files has been changed to a domain account for VS 2003 and VS 2005. I recently installed VS 2005. All seemed to be ok afterwards. I did no development for a couple of weeks, came back and I kept receiving Access Denied to Microsoft.Net\Temporary Internet Files\... Access is Denied. ASPNET had full access to that file and all subfolders. The website I am...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9909
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8794
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7342
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6623
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3889
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2765
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.