Deleting Files From A Letterbox In VB2008?

Aug 27, 2009

I have a serious problem,so i tought i can ask here.I'm only a BEGINER!So,i looked on youtube,to make an anti-virus in Visual Basic(i then heard about VB2008:D).I maked a scan button,and putted some strings that will scan some computer's folders and show de detected viruses on a letterbox.Now,i wonder if someone nows a way(code or not) to add a button that will delete all the files detected that are shown on that letterbox.I want not to delet them manualy,i want my small anti-virus to that that.IS THERE A WAY?

View 14 Replies


ADVERTISEMENT

VB2008 Deleting Spaces, Putting Each Line Of Text Into Its Own Label Or Textbox?

Oct 13, 2009

OK, SO i have this program that outputs all the servers on a specific game. It outputs it to a text file. HOWEVER, There is a lot of annoying spaces. This is kind of hard to explain, so ill try to explain it. This is what The text file looks like.

173.81.220.139 2302
70.26.235.69 2302
24.26.119.209 2302

[code].....

View 13 Replies

C# - Deleting Files In A Directory?

Feb 12, 2011

I have seen questions like What is the best way to empty a directory?

But i need to know,

what is the fastest way of deleting all the files found within the directory, except any .zip files found.

Smells like linq here... or what?

UPDATE: By saying fastest way, i mean the Fastest execution time.

View 3 Replies

Deleting ALL Files Within A Folder

Jul 3, 2010

vb 2008 on Vista: I have a folder called "Documents", and another called "PastDocuments". When the user deletes a client, I copy the contents of Documents into the Past Documents folder. Next, I need to delete the Documents folder, but there are existing files within that folder, so it won't let me delete it. What is the easiest way to delete ALL files within that folder?

View 1 Replies

Deleting Files But Not Subdirectories

Nov 26, 2009

I have some code that launches a .bat file. The error comes from within the .bat file, navigating to the specified directory."F/Program Files/ Tversity/Media Server/data/ if i run cmd, then manually navigate to F/program files, i cannot navigate into any other directory within program files. Wierd..if there is an easier option to just use vb.net without launching a .bat that might help please let me know. i know i am not showing any vb.net code, but it just launches a .bat file. i know the forum rules, but i am hoping that someone might know why i can't navigate to my program files. it is not permissions, i am an admin on the local machine no domain.

View 1 Replies

Deleting Files In A ListBox

Mar 11, 2010

So I have a program that allows the user to load up some images, which appear in a ListBox. You can click the imported images and they load into a PictureBox. [code]The path is not of a legal form.You can load up the code and see for yourself. Now I need to be able to delete these images from the ListBox. The exception occurs because the image is now null, and can't load.

View 6 Replies

Deleting Records From Files?

Mar 13, 2012

Just wondering how to delete a selected record from a .dat file

I am new to programming so go easy

View 2 Replies

Messagebox In Deleting ,tmp Files?

Jun 27, 2011

I'm working on this program to delete .tmp files that are older then 5 days. The only problem that im running into is if there are no files older than 5 days to display a messagebox "There are no .tmp files older than 5 days".

View 4 Replies

Progress Bar And Deleting Files ?

Jul 10, 2009

I have a problem with a progress bar, i want to delete a folder with this sub:

Dim di As New System.IO.DirectoryInfo(path)
di.Delete(True)

I would like to see a progress bar. I saw some examples with copy but doesn't work with this sub.

View 5 Replies

VS 2005 Deleting Some Csv Files

Jun 4, 2009

I'm experiencing a wierd problem deleting some .csv files. Any .csv files named 1.csv, 2.csv, or 3.csv will not delete using delete() method of system.io namespace. if i do any number greater than 3 it works. For example, 4.csv, 5.csv, etc. works fine. 1.xls, 2.xls also is ok. The error it is throwing in my log is 'access to the file is denied.' Nothing is using the file. I even copied a new file into the directory and it does not work. I even created a 1.csv in a totally different directory with no luck. What is going on with this? Has anyone ever experienced this?

View 9 Replies

Deleting A File Or Files Using A Listbox?

Jan 19, 2010

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.

View 4 Replies

Deleting Files In Directory With Extension GIF?

Feb 14, 2010

I have VB 2008. How can I delete ALL files in a directory with the extension ".gif" ?

View 2 Replies

Deleting Files With Dynamic Names?

Mar 11, 2012

Each time it runs, a program of mine creates an Excel document and names it using the current date ("Alerts from 29062011.xlsx" for example). The program gets run once a day,every day.The users have requested that I have the program delete the previous days Excel file each time it runs so that they don't take up space. I'm unsure how to do this though since, for example, if it is run on the first day of the month it would have to know

View 6 Replies

Deleting Files With Kill Dates

Nov 30, 2010

My naming convention for certain files is ------------kill 28 nov 2010.ext Is there a way I can throw an if statement and a few variables together to check each file in a folder and if date.today = variable then delete file? I want to make a program i can schedule to run daily w/task scheduler, I haven't used VB in awhile but just found the disks from school so i figured this was the easiest way to go about it.

View 9 Replies

Deleting Multiple Files In A Directory?

Oct 9, 2009

I am trying to delete multiple files in a certain directory. I need to delete *.o, *.r, *.w, *.rs, *.op, *.os. My coding does not seem to be working.

My.Computer.FileSystem.CurrentDirectory = "c:RELAP5MOD4Demo"

View 1 Replies

RE Permission Error For Deleting Files

Sep 21, 2009

I am concatinating a couple of text files and then deleting the individual files. (Not the output file)

The only problem is that I am getting a permission error "Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)" when I try to delete the files.

I can delete the files using the code below if I do not concatinate the files but as soon as I do I cannot delete them.

To concatinate:
Public Sub MeltText()
Dim SW As New IO.StreamWriter(OutPutFile)
Dim Files As String() = IO.Directory.GetFiles(StartDirectory, "*.txt")
Dim File As String
SW.WriteLine("Sw

View 2 Replies

Searching And Deleting Files (using Wildcards)

Jun 29, 2009

how to even start a code project of this sort but here it goes... I have an external Hard Drive with some music. My itunes makes duplicates of all my songs so this is what i have.

Dance.mp3
Dance 1.mp3
Dance 2.mp3
Dance 3.mp3
Party.mp3
Party 1.mp3
[Code]...

What I want to do is have the program search the files and delete all files that have a duplicate with a number behind it... Now I would use windows search but some of the songs are like 1001.mp3 or 1001 1.mp3... I want it to look like this when i get done (from the above):

[Code]...

View 1 Replies

VS 2005 Deleting Files From A Folder?

Apr 1, 2009

I have created a project where I can attach files and I am displaying the name of the file, example:

Mytestfile.doc
mytestfile.txt
Mytestfile.pdf

I have the names being displayed on a listbox, so far everything is working just the way I expected to work.When a file is selected from my opendialogbox, the file gets saved into a folder under my local disk, so far so good.The problem that I am having is deleting the file from the folder.I have added a delete button and I would like to when I click or highlight one of the file names to go into where the file was saved previously and deleted This is the code that I have for the delete funtion:

[CODE Dim sFileName As String = "C:program filesSupport DeskAttachments" & ListBox1.Text
System.IO.File.Delete(sFileName)][/code]

The problem is that if I add the code to the clcik event under the listbox, it works great, but if I add the code to the click event under my delete button, it doesn't work, what I found is that under the path, if I am under the click event from the listbox when it gets to the lisxtbox.text it displays the file name, which is what I whant, but when i tried the code under the click event under my delete button the listbox.text is blank.

View 3 Replies

VS 2010 Deleting Large Files?

Jul 6, 2010

I have a series of large files (4GB) that when I delete takes a very long time. This only occurs on a USB drive that I have attached to my PC. If I do the same thing on the internal drive the files delete quickly. It is as if the files are being overwritten before being deleted. I am looking for some guidance or other approaches.

View 5 Replies

Deleting Image Files Within A Directory (That Might Be Used By Another Process)

Aug 10, 2009

How can i delete image files (ex *.gif) that might be in use, by another process in a directory?

View 3 Replies

VB Script For Zipping And Deleting The Origianl Files?

Jan 27, 2011

Need code for the following

The VB script will have 3 parameters

1.zip filename
2.extraction filename
3.rejection file name

We need to do the following

1)It should first zip the extraction file and rejection file into zipfile name as in argument 1

2)Check the file zippping is completed

3) deleted the original files(extraction file and rejection file)

[code]...

View 1 Replies

Why Are The New (moved To) Text Files Deleting After The Move

Nov 29, 2011

Why are my new (moved to) text files deleting after the move?

If TextBox1.Text = "* DISPLAY SCROLL 10 *" Then
Dim D10A As StreamReader = File.OpenText("LINE 3 UNITS.txt")
D10A.Close()

[code]....

the file "line 3 units.txt" contains 3 choices. what I need to do is write one of these selections to the new file "line 3 units new.txt" then recognize the contents of this file to control a boolean statement.

Dim W As String = (D10B)
If W.ToLower.Contains("load") Then
LIN3LD = True

[code]....

I end up with 2 known problems.

1) The new text files delete

2) if the file doesn't delete (for whatever reason) the CONTAIN statement doesn't recognize either "load" or "speed"

View 2 Replies

Deleting Contents Of A Folder Including All Subfolders And Files?

Apr 19, 2012

I am trying to write an application to delete files in a temp directory - so for example C:WindowsTemp

I need it to delete all files and subfolders (including all files in these subfolders) - but to NOT delete the top/root folder i.e. in this case Temp

I have tried

Dim fso, fldr
Set fso = CreateObject("Scripting.FilesystemObject")
Set fldr = fso.GetFolder("c:windows emp")

[Code].....

View 9 Replies

Deleting Temporary Internet Files, Cookies And History Etc From VB?

Jun 26, 2008

trying to write my own little disk cleanup utility (for a client) Can clean out windows/temp folder okay, but when it finds a file locked by a process it crashes - I have found out how to use error handlers etc to control the error but how can I unlock(?) the files in use before I try to delete them2) How can I clear cookes, history, temp internet files etc from within vb?

View 14 Replies

Ignoring A Specific File When Deleting All Files In A Folder?

May 27, 2009

i'm currently working on making a program that does all my normal pc clean up work for me. delete temp files, tif, cookies prefetch etc and i'm using code like this

vb.net
Dim rKey As Microsoft.Win32.RegistryKey
Dim path As String
rKey =

[Code]....

I'm stuck in the cookiew folder since "index.dat" doesn't delete and it causes the form to crash.

View 8 Replies

VS 2008 Delete Button For Deleting Both Files And Folders?

Jan 29, 2010

here is the code i use for adding folders to the treenode. it works great but i want a delete button for deleting both files and folders... and how can i make the treenode auto refreshing. or refreshing when exiting another form...

Private Sub PopulateTreeView(ByVal dir As String, ByVal parentNode As TreeNode)
Dim folder As String = String.Empty
Try

[Code]....

View 1 Replies

VS 2008 Trouble With Emailing And Then Deleting Emailed Files

Aug 12, 2010

My app looks in a folder for all the pdf files and then emails it to an address.If the email was sent successfully, the file in the folder must be moved to a new folder called "Sent". Or the approach you will see in my code where I copy the file to the new location and then delete the old one. [code]

View 4 Replies

Deleting Windows Temp Files When User Press Button

Aug 20, 2011

How To Make It So When You Press A Button, It Deletes Windows Temp Files.

View 1 Replies

VS 2010 : Deleting Files, Fonts From Resources, Playing Videos?

Jan 11, 2012

I am having a _ton_ of issues, and I am hoping some of you could clear it up...

1. OK So a while back someone showed me an example for fonts from resources, but I noticed if you close the window that it opens, The entire program shuts down... what can I do to fix it?Also, The fonts are not showing up on all computers, only this one....

2. I am trying to delete a image file, which the program downloads from the internet, and can change regularly, but when I try to delete it will not delete. It says its in use, and I cant figure out where.

3. I am trying to play videos using the following

vb
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Const WS_CHILD As Integer = &H40000000

[code]....

Now, I have confirmed the files it is attempting to play are in fact valid video files. It refuses to play all but the last one.

View 3 Replies

[vb2008] - Make A Log-in System That Loads The .txt Files From Server

Apr 3, 2009

Well I want to make a log-in system that loads the .txt files from your server (Simular to this code:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved