delete

How to delete many number of 0 byte files in linux?

Hi all, I've a directory with many number of 0 byte files in it. I can't even see the files when i use the ls command. I'm using a small script to delete these files but sometimes that does not even delete these files. Here is the script: i=100 while [ $i -le 999 ];do rm -f file${i}*; let i++; done Is there any other way to d...

How to delete documents from a document library in WSS 3.0?

Hi, I need a way to programmaticaly delete documents from Sharepoint 2007 document library. I don't have access to the server to deploy server-side code, so it needs to be via web service or pure http. I can find plenty of examples for removing attachments from list items, but nothing for removing from document libraries. Idea, anyone?...

How can I delete temporary files that are still open in other programs?

My program writes temporary PDF files (using Path.GetTempFileName) which are then passed to the default PDF handler (typically Adobe Reader) for display. I have a finally block in my Main method to delete the temp files, but if Adobe Reader is still open when my program closes, the files remain open and can't be deleted. One solution wo...

C++: Writing a function to free a pointer and the assigning it NULL

So I was asked this in a recent interview, basically writing a function to combine the free and Assigning null functionality. I answered in the following manner, void main() { int *ptr; ptr = new int; ptr = newdelete(ptr); } (int*) newdelete (int *ptr) { delete(ptr); return NULL; } So after execution, t...

MySQL attempting to delete all rows which are not constrained by foreign key.

Okay, this is (probably) a very simple question, but I am afraid I know almost no MySQL, so please put up with me. I'm just trying to delete every row from one table which is not constrained by a Foreign Key in another table - a specific table, there are only two tables involved here. The create statements look a bit like: CREATE TABLE ...

C# Stackoverflow in recursive deleting directory operation

Hey guys ;) I'm currently rewriting a file deletion tool with safe deleting algorithm and stuff. Wenn I'm trying to browse through a directory recursivly and to delete all files in there and all subdirs etc. the debugger will throw a stackoverflow exception. Code : private void wipeFile(string file) { bool ret = false;...

Django Python Delete Project App Library

If I want to delete a Django App or Project. Is there a way to cleanly delete it? Or a library in Python? How can I delete and re install libraries. So I am SURE that nothing is left of that library. Thanks a lot ...

How to delete lot of objects named with common prefix from s3 bucket?

I have files in s3 bucket, and their names have the following format: username#file_id#... How to remove all john#doe#* items, without listing them? There are thousends of them, so when user request my app to delete all of them, he has to wait. ...

How to delete Eclipse completely (including settings and plugins) from Mac OS X?

My Eclipse with GAE broken and works strangely. So I deleted Eclipse from Application folder, but there are garbages left. I re-downloaded fresh new eclipse, but it runs with old settings, and broken GAE structure remained. How can I DELETE completely Eclipse from my Mac? (without any kind of settings/plugins/logs etcs.) ...

what does "delete from table where NULL = NULL" means ?

what does "delete from table where NULL = NULL" means ? ...

SQL : how to delete the last row of a query

Hi, I have a table containing the scores of my game CREATE TABLE Scores ( PlayerName varchar(50), LevelId integer, Score integer, Difficulty integer ); and I would like to always limit the number of score entries to 10 elements (for a specific level, and difficulty) So when the score table has 10 entries (for a specific lev...

EF : DeleteObject() in foreach loop

With Entity Framework, I try to delete some objects from my object context like that : foreach (var item in context.Items.Where( i => i.Value > 50 ) ) { context.Items.DeleteObject(item); } With this code, I have a "Collection Was Modified" Exception. So, how can I do a batch delete ? ...

MySQL Delete Records from 2 Tables

Hey everyone, Im looking to delete information in two different tables in 1 query, based on an ID. I've tried several solutions on here to accomplish this task but still have not accomplished what I'm trying to do. Table 1 - Content ---------- --------- ContentID | Content -------------------- Table 2 - Votes --------------------...

How can I tell file deletion from directory deletion using JDK 7?

I am using JDK 7's WatchService to monitor directories. The ENTRY_DELETE event tells me an entry has been deleted. I can get the name of that entry doing something similar to: WatchEvent<Path> ev = cast(event); Path name = ev.context(); Path child = dir.resolve(name); I want to know if the deleted entry was a file or folder. Naturall...

multi delete record

i have array for (int i = 0; i < ds100.Tables[0].Rows.Count; i++) how to delete multi rocord for each value using c#, dot.net ...

How can I do retain operation during deleting an observation in SAS?

The problem, that if the else is executing, increment of S will not accomplish. Any idea? data osszes_folyositas; set osszes_tabla; retain old_xname; retain s 0; if xname ne old_xname then do; old_xname = xname; s = 0; end; else do; s = s + Foly_s_tott_t_rgyh_ban_HUF; delete; end; run; ...

codeigniter active record delete function not working

I have a function written to delete entries from a table called stack. I have written similar function for other tables and it works. For this its not working, but no errors too. How can i find out whts wrong? Controller entry: function delete_tag($id) { $this->Mrestaurant->delete_tag($id); echo 'deleted!'; ...

Where to delete an object created by factory?

If I have a factory, that creates an object and returns a pointer to it, what will be a better way to delete it: By delete call in the "user" code, or by a new DestructObject function which I should have together with the factory? ...

Is there some method to clen all model in Django (cleen table n database)?

Is there some method to clen all model in Django (cleen table in database)? Sorry i'm not a native english speacker. That why i'm making a lot of misstakes and some time asking question whith i cant undersand by reading official documentation. But I'm doing my best. ...

Is it safe to delete an svn copy and re-export to the same location?

I've screwed up a certain sub-folder in my svn working copy and now I am unable to commit the entire directory. I am however able to commit individual sub-directories (not too many), and thus have been able to save my work on the whole. If I try to commit the entire working directory, I get a "Unable to lock {PATH}" error. I've tried svn...