Search Results

Search found 8982 results on 360 pages for 'delete'.

Page 8/360 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Delete System Files containing string

    - by Fuzz Evans
    I am trying to write a batch file that will examine a given directory, read each file for a given string "Example" and then delete any files that contain the string. The files are also System Files so I don't know what the exact extension is or if that matters (maybe you can just omit a file type filter and have it read all files?). Some of the files will be locked from reading as well so it needs to handle access denial errors if that occurs, not sure how batch files handle that.

    Read the article

  • Delete duplicate rows, do not preserve one row

    - by Radley
    I need a query that goes through each entry in a database, checks if a single value is duplicated elsewhere in the database, and if it is - deletes both entries (or all, if more than two). Problem is the entries are URLs, up to 255 characters, with no way of identifying the row. Some existing answers on Stackoverflow do not work for me due to performance limitations, or they use uniqueid which obviously won't work when dealing with a string. Long Version: I have two databases containing URLs (and only URLs). One database has around 3,000 urls and the other around 1,000. However, a large majority of the 1,000 urls were taken from the 3,000 url database. I need to merge the 1,000 into the 3,000 as new entries only. For this, I made a third database with combined URLs from both tables, about 4,000 entries. I need to find all duplicate entries in this database and delete them (Both of them, without leaving either). I have followed the query of a few examples on this site, but whenever I try to delete both entries it ends up deleting all the entries, or giving sql errors. Alternatively: I have two databases, each containing the separate database. I need to check each row from one database against the other to find any that aren't duplicates, and then add those to a third database. Edit: I've got my own PHP solution which is pretty hacky, but works. I cannot answer my own question for 8 hours because I'm new, so here it is for now: I went with a PHP script to accomplish this, as I'm more familiar with PHP than MySQL. This generates a simple list of urls that only exist in the target database, but not both. If you have more than 7,000 entries to parse this may take awhile, and you will need to copy/paste the results into a text file or expand the script to store them back into a database. I'm just doing it manually to save time. Note: Uses MeekroDB <pre> <?php require('meekrodb.2.1.class.php'); DB::$user = 'root'; DB::$password = ''; DB::$dbName = 'testdb'; $all = DB::query('SELECT * FROM old_urls LIMIT 7000'); foreach($all as $row) { $test = DB::query('SELECT url FROM new_urls WHERE url=%s', $row['url']); if (!is_array($test)) { echo $row['url'] . "\n"; }else{ if (count($test) == 0) { echo $row['url'] . "\n"; } } } ?> </pre>

    Read the article

  • How do I delete old calendar items in Outlook 2003?

    - by Ramesh
    Hi. I'm trying to delete old calendar items (I have a few years' worth) in Outlook and was wondering if there was a way to delete only non-recurring items as I need the recurring events for the future. I tried View Arrange by Current view Category and figured that I could manually check and delete any calendar items by hand. Is there a more efficient way to do this without having to actually script code? Thanks for your time!

    Read the article

  • Windows XP: How to delete files and folders that cannot be deleted?

    - by glenneroo
    I have a backup copy of a previous Windows' Documents and Settings folder which only contains my original user and within 2 more directories: Favorites and Local Settings. When I try to delete Local Settings I get this error: When I try to delete Favorites, I get this error: I ran this in a cmd shell: attrib *.* -r -a -s -h /s ...but it did not help, nor did it return any errors/warnings. I used Unlocker v1.8.5 and LockHunter repeatedly at multiple levels to see if any files are in use, but both always say: No Files Locked. Update #1: I was able to rename the directory, which now gives me this warning before (trying to) delete: If I press Yes (or Yes to All) then I get this error: Update #2: I let chkdsk /f run which required a reboot since it's on my primary system partition. During Stage 2 scanning, I received about 40 of these: Deleting an index entry from index $0 of file 25. ...followed by: Deleting index entry cookies in index $I30 of file 37576. ...but I still get the first error dialog above when trying to delete. Update #3: Digging deeper, the 99 is the name of one of many directories located deep in here: C:\Documents and Settings.OLD\User\Local Settings\Application Data\Microsoft\Messenger\[email protected]\SharingMetadata\[email protected]\DFSR\Staging\CS{D4E4AE55-B5E2-F03B-5189-6C4DA6E41788}\ Inside each of those directories were files with names such as: 2300-{C93D01AC-0739-4FD9-88C7-13D2F21A208E}-v2300-{C93D01AC-0739-4FD9-88C7-13D2F21A208E}-v2300-Downloaded.frx I noticed that, unlike all the directories, I couldn't rename any of these files. I also noticed that the file + dir names were extremely long: Original directory = 194 characters Filenames = 100+ characters Together the length exceeds the 255-char limit which is bad and would explain the error message I posted in Update #1. Partial Solution: Rename all directories until the total path length is less than 100. Afterwards I was able to rename the .frx files, not to mention delete everything inside the Local Settings directory. This is only a partial solution because this (empty) directory is still undeleteable: C:\1\2\Favorites\Wien\What To Do.. I'm guessing because of the ".." at the end, Windows (Explorer and cmd) can't deal with it: Here is what Explorer properties shows: Any ideas?

    Read the article

  • How to delete files and folders that cannot be deleted?

    - by glenneroo
    I have a backup copy of a previous Windows' Documents and Settings folder which only contains my original user and within 2 more directories: Favorites and Local Settings. When I try to delete Local Settings I get this error: When I try to delete Favorites, I get this error: I ran this in a cmd shell: attrib *.* -r -a -s -h /s ...but it did not help, nor did it return any errors/warnings. I used Unlocker v1.8.5 and LockHunter repeatedly at multiple levels to see if any files are in use, but both always say: No Files Locked. Update #1: I was able to rename the directory, which now gives me this warning before (trying to) delete: If I press Yes (or Yes to All) then I get this error: Update #2: I let chkdsk /f run which required a reboot since it's on my primary system partition. During Stage 2 scanning, I received about 40 of these: Deleting an index entry from index $0 of file 25. ...followed by: Deleting index entry cookies in index $I30 of file 37576. ...but I still get the first error dialog above when trying to delete. I ran chkdsk again, this time: chkdsk /f /r. Produced no messages. Same result when deleting. Update #3: Digging deeper, the 99 is the name of one of many directories located deep in here: C:\Documents and Settings.OLD\User\Local Settings\Application Data\Microsoft\Messenger\[email protected]\SharingMetadata\[email protected]\DFSR\Staging\CS{D4E4AE55-B5E2-F03B-5189-6C4DA6E41788}\ Inside each of those directories were files with names such as: 2300-{C93D01AC-0739-4FD9-88C7-13D2F21A208E}-v2300-{C93D01AC-0739-4FD9-88C7-13D2F21A208E}-v2300-Downloaded.frx I noticed that, unlike all the directories, I couldn't rename any of these files. I also noticed that the file + dir names were extremely long: Original directory = 194 characters Filenames = 100+ characters Together the length exceeds the 255-char limit which is bad and would explain the error message I posted in Update #1. Partial Solution: Rename all directories until the total path length is less than 100. Afterwards I was able to rename the .frx files, not to mention delete everything inside the Local Settings directory. This is only a partial solution because these (empty) directories are still not deleteable, C:\1\2\Favorites\Wien\What To Do.. C:\1\2\Favorites\Photography\FIRE Same error as above: Here is what Explorer properties shows for both folders: Update #4 (another partial solution): Using harrymc's answer combined with thoroughly reading through this amazing MS-KB article which contains nearly everyone's idea and then some, inconspicuously titled: You cannot delete a file or a folder on an NTFS file system volume. I was able to delete the 2nd folder C:\1\2\Favorites\Photography\FIRE - the problem being that there was an invisible trailing space at the end. I got lucky when I did an auto-complete whilst playing around with the del "\\?\<path>" command which he suggested. NOTE: A normal del did NOT work, nor did deleting from explorer. Now all that is left is the first directory C:\1\2\Favorites\Wien\What To Do.. (yes I tried endlessly with multiple combinations of the above solution ;) Keep 'em coming! =)

    Read the article

  • Why is it not possible to delete IE addons from the IE interface?

    - by axk
    You can disable but you can't delete them from the "Manage addons" dialog. In IE 7 there was a delete button but I've never seen it enabled, in IE 8 I don't see the button at all. My guess would be that IE addons are registered as COM components and you cannot track who uses that component besides IE itself so it would be unsafe to delete.

    Read the article

  • How to programatically self delete? (C# WinMobile)

    - by Christian Almeida
    How to programatically self delete? C# / .NetCF2 / Windows Mobile 6 Please, I don't want to discuss WHY to do it, I just need to know HOW to do it! Important: The "second application" approach is NOT an option. (Unless that second application can be "extracted" from running app, but I don't know how to do it!). No problem in forced reboot, if windows do the trick at startup. (Is it possible? Nice! Show me how!). Code samples are welcome.

    Read the article

  • flex combobox backspace or delete key does not delete highlighted text

    - by crazy horse
    Context: I am implementing a flex auto-suggest combobox - as the user types in each character: Consider the string 'Stackoverflow' and user input = 'st' 1) the data provider is filtered to show all items starting with 'st' 2) text is set to auto-suggest string such that the un-typed part is highlighted. So for instance, the combobox text may contain st'ackoverflow', where 'ackoverflow' is highlighted using setSelectedIndex() Issue: When I hit back-space or delete, and check the 'this.text' value, I expect that the last un-highlighted character ('t' in the above case) gets deleted and the data provider is filtered to show all items starting with 's'. However the text property contains 'st', as before Question: what am I missing? What else can I try out?

    Read the article

  • Delete all records with EDM

    - by WooBoo
    Yes, I need to clean a table and I have EDM that comes with .net 3.5 sp1 (I haven't tried with EF4). I know that works: foreach(var item in ctx.Elements){ ctx.DeleteObject(item); } but it's not a point to get all data from the table and and deleting one by one. Ok, I know it's deleted when I run ctx.SaveChanges(); but DELETE FROM [Elements] looks better :) Tried stored procedure and function import, but VS designer for EDM just doesn't work. I also couldn't find any resources about defining it in .edmx manually.

    Read the article

  • Delete a header in PHP

    - by Boldewyn
    To allow caching a PHP generated file, I want to make sure, that the 'Pragma: no-cache' header is not set. However, how do I delete a possibly already set header? That is, it could be possible, that somewhere in the code someone wrote header('Pragma: no-cache'); and now I want to make sure, the header is not sent. Is it sufficient to do this: header('Pragma:'); or is there something like delete_header() (which would, apparently, be undocumented or well-hidden)?

    Read the article

  • Windows batch file to delete folders/subfolders using wildcards

    - by Marco Demaio
    I need to delete all folders in "tomin" folder, which name contains terminates with the ".delme" string. The deletion need to be done recurively: I mean on all directory and SUB directories. I though to do this: FOR /R tomin %%X IN (*.delme) DO (RD /S /Q "%%X") but it does not work, I think /R ignores wildcards. Before asking this quation I searched also in SO and found this: but the answers did not help me in solving my issue, following the suggestion given there I tried: FOR /F tomin "delims=" %%X IN ('dir /b /ad *.delme') DO RD /S /Q "%%X" But it did not work either. Any help aprreciated, thanks!

    Read the article

  • c++ new & delete and string & functions

    - by Newbie
    Okay the previous question was answered clearly, but i found out another problem. What if i do: char *test(int ran){ char *ret = new char[ran]; // process... return ret; } And then run it: for(int i = 0; i < 100000000; i++){ string str = test(rand()%10000000+10000000); // process... // no need to delete str anymore? string destructor does it for me here? } So after converting the char* to string, i dont have to worry about the deleting anymore?

    Read the article

  • How to set RequestBody for Http Delete method.

    - by Tushar Tarkas
    I am writing a client code for a server which Delete API. The API specification requires data to be sent. I am using HttpComponents v3.1 library for writing client code. Using the HtpDelete class I could not find a way to add request data to it. Is there a way to do so ? Below is the code snippet. HttpDelete deleteReq = new HttpDelete(uriBuilder.toString()); List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new BasicNameValuePair(RestConstants.POST_DATA_PARAM_NAME, postData.toString())); try { UrlEncodedFormEntity entity = new UrlEncodedFormEntity(postParams); entity.setContentEncoding(HTTP.UTF_8); //deleteReq.setEntity(entity); // There is no method setEntity() deleteReq.setHeader(RestConstants.CONTENT_TYPE_HEADER, RestConstants.CONTENT_TYPE_HEADER_VAL); } catch (UnsupportedEncodingException e) { logger.error("UnsupportedEncodingException: " + e); } Thanks in advance.

    Read the article

  • bat script to delete file older than 7 days

    - by Jessie
    hi guys i have a bat script in which gets all files in a folder and then converts this folder with its contents into a one RAR file. This script also adds the current date once it makes a copy and moves it this file into a backup folder, i am planning to have this bat file run by a windows scheduler task every day. My question is there a way to add into this cript to also delete all rar files older than 7 days in the backup folder? for /f "delims==" %%D in ('DIR D:\scripts /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" a -agyyyy-MM-dd -r "c:\backup\scripts.rar" "%%D" )

    Read the article

  • Delete file after sharing via intent.

    - by Matt
    I'm trying to delete a temporary file after sharing it via android's Intent.ACTION_SEND feature. Right now I am starting the activity for a result and in OnActivityResult, I am deleting the file. Unfortunately this only works if I am debugging it with a breakpoint, but when I let it run freely and say, email the file, the email has no attachment. I think what is happening is my activity is deleting the file before it had been emailed. What I don't get is why, shouldn't onActivityResult only be called AFTER the other activity is finished? I have also tried deleting the file in onResume, but no luck. Is there a better way to do this?

    Read the article

  • Oracle global_names DELETE problem

    - by jyzuz
    I'm using a database link to execute a DELETE statement on another DB, but the DB link name doesn't conform to global naming, and this requirement cannot change. Also I have global_names set to false, and cannot be changed either. When I try to use these links however, I receive: ORA-02069: - global_names parameter must be set to TRUE for this operation Cause: A remote mapping of the statement is required but cannot be achieved because GLOBAL_NAMES should be set to TRUE for it to be achieved. - Action: Issue `ALTER SESSION SET GLOBAL_NAMES = TRUE` (if possible) What is the alternative action when setting global_names=true is not possible? Cheers, Jean

    Read the article

  • Delete duplicate records from a SQL table without a primary key

    - by Shyju
    I have the below table with the below records in it create table employee ( EmpId number, EmpName varchar2(10), EmpSSN varchar2(11) ); insert into employee values(1, 'Jack', '555-55-5555'); insert into employee values (2, 'Joe', '555-56-5555'); insert into employee values (3, 'Fred', '555-57-5555'); insert into employee values (4, 'Mike', '555-58-5555'); insert into employee values (5, 'Cathy', '555-59-5555'); insert into employee values (6, 'Lisa', '555-70-5555'); insert into employee values (1, 'Jack', '555-55-5555'); insert into employee values (4, 'Mike', '555-58-5555'); insert into employee values (5, 'Cathy', '555-59-5555'); insert into employee values (6 ,'Lisa', '555-70-5555'); insert into employee values (5, 'Cathy', '555-59-5555'); insert into employee values (6, 'Lisa', '555-70-5555'); I dont have any primary key in this table .But i have the above records in my table already. I want to remove the duplicate records which has the same value in EmpId and EmpSSN fields. Ex : Emp id 5 Can any one help me to frame a query to delete those duplicate records Thanks in advance

    Read the article

  • trying to delete a song from a list UITableView sigbart error - addMusic Example

    - by Pavan
    hi im trying to implement a delete feature into the addmusic example this is the code ive added it doesnt work, i cant get my head around whats wrong. can someone please tell me whats wrong and what i need to do to make sure it works. - (void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath { } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { // If row is deleted, remove it from the list. if (editingStyle == UITableViewCellEditingStyleDelete) { MainViewController *mainViewController = (MainViewController *) self.delegate; NSUInteger index = [indexPath row]; MPMediaItem *itemToDelete = [mainViewController.userMediaItemCollection mediaItemAtIndex:index]; if ([itemToDelete isEqual:mainViewController.musicPlayer.nowPlayingItem]) { [mainViewController.musicPlayer skipToNextItem]; } MPMediaItemCollection *newCollection = [mainViewController.userMediaItemCollection collectionByDeletingMediaItemAtIndex:index]; mainViewController.userMediaItemCollection = newCollection; NSUInteger indices[] = {0, index}; NSIndexPath *deletePath = [NSIndexPath indexPathWithIndexes:indices length:2]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:deletePath] withRowAnimation:UITableViewRowAnimationFade]; I also get these warnings when i compile the program and run it: heres the image: http://www.freeimagehosting.net/uploads/6e42f166b9.png Any ideas and help appreciated.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >