User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,593 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,520 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 3320 | Replies: 3
Reply
Join Date: Sep 2007
Posts: 4
Reputation: claverchou is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claverchou claverchou is offline Offline
Newbie Poster

c# nse File.Delete cannot delete "Temporary Internet Files" files,help me

  #1  
Sep 8th, 2007
CODEGet "Temporary Internet Files" directory and files)
const int cookies = 32;
Shell32.Folder objFolder;
Shell32.FolderItems objFolderItems;
Shell32.ShellClass objShell;

string strFolderpath = System.IO.Path.GetTempPath().Substring(0, System.IO.Path.GetTempPath().Length - 1) + "orary Internet Files\\";
objShell = new Shell32.ShellClass();
objFolder = objShell.NameSpace(cookies);
objFolderItems = objFolder.Items();


foreach (Shell32.FolderItem objFolderItem in objFolderItems)
{

//MessageBox.Show(strFolderpath+objFolderItem.Path.ToString());

string strDeleteFile = strFolderpath + objFolderItem.Path.ToString();

File.Delete(strDeleteFile);//delete cannot

}
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 4
Reputation: claverchou is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claverchou claverchou is offline Offline
Newbie Poster

RE:c# use File.Delete cannot delete "Temporary Internet Files" files,help me

  #2  
Sep 9th, 2007
CODEGet "Temporary Internet Files" directory and files)
const int cookies = 32;
Shell32.Folder objFolder;
Shell32.FolderItems objFolderItems;
Shell32.ShellClass objShell;

string strFolderpath = System.IO.Path.GetTempPath().Substring(0, System.IO.Path.GetTempPath().Length - 1) + "orary Internet Files\\";
objShell = new Shell32.ShellClass();
objFolder = objShell.NameSpace(cookies);
objFolderItems = objFolder.Items();


foreach (Shell32.FolderItem objFolderItem in objFolderItems)
{

//MessageBox.Show(strFolderpath+objFolderItem.Path.ToString());

string strDeleteFile = strFolderpath + objFolderItem.Path.ToString();

File.Delete(strDeleteFile);//delete cannot

}[/quote]
Reply With Quote  
Join Date: Sep 2007
Posts: 4
Reputation: claverchou is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claverchou claverchou is offline Offline
Newbie Poster

Re: c# use File.Delete cannot delete "Temporary Internet Files" files,help me

  #3  
Sep 9th, 2007
up
Reply With Quote  
Join Date: Sep 2007
Posts: 4
Reputation: claverchou is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claverchou claverchou is offline Offline
Newbie Poster

Re: c# nse File.Delete cannot delete "Temporary Internet Files" files,help me

  #4  
Sep 9th, 2007
help me,thanks
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 6:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC