I have written a conversion (vb6) tool that migrates data (SQL 2008) from one database to another and I make some temporary files (.bak files)I would like to delete after the conversion finishes. The application will not be running on the SQL Server so I need to remotely delete the files. Is there a way to delete a file remotely without having to use an administrative share or the xcmd in SQL Server?
I am creating a program that allows a person to enter details about their farm, stock, and machinery in order to electronically keep track of all of the information. I have created the forms and done all the coding for the data entry, and now what I would like to do is allow the user to delete a single record from the .dat file. I am able to delete it from the LstBox (using a "Delete Entry" btn coded simply with
(using the vehicles section for examples)), but I am unsure of how to delete it from the .dat file as well, to prevent it reloading upon data change / program reload. Also I would like to be able to have a reminder come up on the program start up that gives a reminder to (in the vehicles instance)when a vehicles rego is due, the date being associated to a date that is entered into the same lstbox data using a datetimepicker.
i just want to ask how can i save the file location or directory of a file in mysql without deleting its slashes...i tried to save it directly.. for example: the original directory is c:folderimg.jpg and when i checked it on mysql it is save as c:folderimg.jpg
I know that Deleting a specific line in a sequential text file is impossible but instead copy the needed lines and not copying the unneeded ones to an output file .. killing the old one and renaming the new one with the same.. I can't make this step...
Code: "Josek Sam","68 West Land Street","149 Union of States","4524563","45635463","JOSKSAM1",#2009-03-02#,"MILANCGLZ2008" "Josef Malm","142 Unions Street","64 Hamersters Street","452504","42542054","JOSFMALM2",#2009-03-06#,"MILANCGLZ2008" "Dave Green","131 Oxford Street","96 BlueBane Route","452542452","43254345","DAVGRN3",#2009-03-07#,"MILANCGLZ2008"
I made a form that when you put your CustomerID in Text3 Box.. it access the records and make some calculations. now.. The customer will return the car.. Then his data should be deleted.. I want to know how to make that when I enter the CustomerID and press on the Command button .. It copies the other lines to a new output folder and doesn't copy these ... So it appears to be deleted using this way..
I need to delete some rows from csv file based on a column value. Here is my sample.csv file [code]In my vb.net winforom application, I have to read this file and need to delete the rows related to 06/06/10 date column values then write the remaining rows into new.csv file. So far my program works on reading whole data present in the file.[code]
i am creating a console app that will delete pictures from a directory every 30 minutes. Problem is that its being populated by files every minute or so. So if i go and delete files in that directory then it may cause an error trying to delete a file thats being created just then or opened.
I currently have this code to copy the files to another directory and then delete them from the source directory.Dim f() As String = Directory.GetFiles(sourceDir)
i've tried to make it so Button5 Deletes what TextBox1 says I know its
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If File.Exists("FILE.TXT") Then File.Delete("FILE.TXT")
[code]....
But I want it to find and delete what TextBox1 Says.
I have an aspx page in VB that fills a pdf with data from a web form.I'm using iTextSharp for this and I have no problem with this.This is the second time I've created anything for pdf's and I'm using the code from the first script.The first script wrote the filled in pdf to a directory on the server where one person could access those via another aspx page. I wrote that code probably a year ago.Now, instead of having the filled in pdf sit on the sever, I have to email it, which I was successful at doing.The only issue left is to delete the filled in pdf from the directory.I tried to use file.delete(), but I got an error stating the the file was being used by another process.how to stop the process in order to be able to delete the file.[code]
I have been searching trying to figure out the syntax for this but it escapes me.I am adding records saving and retrieving no proble but how do I delete a record.So far all I have seen in the Database using msAccess is the record marked #DELETED but is not really deleted. Here is my code.
I'm trying to delete a file in the FormClosed method, but I get an error saying it's in use by another process. At this point in my program it's not needed anymore. Is there any way to take control of it and delete it, or is there a better method to try to delete it in?
I have the following xml file output below where Deleteme="true" is written when the user clicks on the row's checkbox. I was thinking that once the data is flagged this way I could read the data back in, somehow delete each row specified as above, and then save the data back out.
i've made a playlist system. It writes all the music file url's to a file separated by a comma. But I want to have a delete button that removed one of the playlist items.
This is what I've tried:
Dim EntireFile Dim myReader As New System.IO.StreamReader(playlist, System.Text.Encoding.Default) EntireFile = myReader.ReadToEnd()
I am sucessfully getting pictures and displaying them but having problems deleting them heres everything I am trying to do: frmCapture:Takes pictures from the webcam and stores them in a location with random filenames..User then ends this process by a button which disposes this form and displays the next one below [code]This form then gets all the files in that directory and uses back and forward buttons going through the images in a picture box.When finished the user then hits a close button that displays another form and disposes that one (this new form waits 5 seconds then tries to delete all files in that directory however its getting an access denied because the file is still in use.[code]
I have a function that is called getWinTemp, it is below, the point in this is to create a temp file in the directory and then stuff it full of calculations and then delete it when the code has finished with it, does this code do that in .net??
Public Sub cleanInput(infile As String, width As Integer) tempfile = getWinTemp Name infile$ As tempfile Open tempfile For Input As #1
In my app i have to copy and then delete image files from memory cards, the problem comes when some of the card inadvertantly have the "Lock" switch engaged turning them to read only.
When trying to delete these files i want to log the failure to delete but not show any UI messages until a time of my choosing.
Here is some sample code i am having trouble with.
Sub Main() Try System.IO.File.Delete("K:BYZTCSQ_0050.JPG")
[Code]...
This works fine when debuging i.e. it tries to delete the file and if not the error is caught and i can proccess it as nessecary, but when i build and run the app i get an error message telling me that the file cannot be deleted.
To test this code you will need a drive that can be physically set to read only (USB memory key, SD card) and try to delete a file on it while debuging and after a build.
Why would the same code run differently and how can i stop the excess error messages?
I have a VB.Net 2010 app and need to delete a file from the hard drive when the app opens up (cache file). What command will perform this action? I know the name in advance, so I can format the command right in the app.
I have been working on software that finds a specific backup file type and lists it in a list box. Then the user selects the files he/she wants to delete. Then clicks the delete button to remove the files.I have everything finished and working excpet for deleting the actual file. I figured out the code to delete the actual list item... but I cannot figure out how to get the selected file to be deleted within its directory as well... been at it for 4 hours now.
I am doing some txt file programming and i came to the problem...I could write what is in a combobox in a txt file to then read it when the app is opened again.But if i want for example to delete a line in the text file.I want for example if i have in the combobox 1,2,3,4,5 and 6 and i select 5 and i touch a button delete , i want the application to check if the value(5 in this case) is in the etxt file and delete
i have to make a program thats a telephone directory. All the information is in different text files. The user has to be able to delete and add people to the directory, i have made it so they can add peple no problem but im having a hard time with the code for deleting them. The questions requires that they only type in the persons name and then they are delted but in the text file they are listed as Fred,123-1234 so when they hit delete the person does not get deleted becuase it is registering there full name as Fred,123-1234 i need it so that it just sees the word Fred and deletes it heres the code. I cant figure out how to do it itried using a query but that didnt work either it just looped infinitely.
Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemove.Click Dim Removename As String = txtName.Text If Removename <> "" Then
Suppose I collect names from a text box and append them to a file ( names.txt) during the day. How can I either delete the file or at least empty it so tomorrow I can start with a blank file again
I want to be able to delete all files in a specific directory, but exclude a specific extension.[code]I can't target a specific file type because there are many file types and during this process, there could be a file type that wasn't there to begin with.
Ok so i have a uni assignment to delete lines of text out of a text file, so far i have figured out how to search the text file for specific bits of text, i,e name of user, ive also used a loop to find out what line in the text file the specific line exists as...my
code so far is Dim line As String Dim Input As StreamReader
[code]....
the selected policy is what im tryin to use to write over the line of texts that already exists however i think that maybe instead of deleteting what exists it will just move it down a line and make a blank line