how to count the content of a specific directory?And how do you delete an old file (ex. say your old program that create a back-up. But it has already created many back-ups and now it takes to much of the space in your hardisk.)
how to count the content of a specific directory?And how do you delete an old file (ex. say your old program that create a back-up. But it has already created many back-ups and now it takes to much of the space in your hardisk.)
In vb.net how do you check if a ANY directory exists inside a directory I would need to know if there is a folder inside the c:windows directory (WITHOUT knowing if there is ANY directory is in there).
I am trying to find a specific file in a specific directory and then i need to get the full path of the file.Is this possible i cant find any help topics about a specific file.
i have windows form datagridview that is already populated with data, what i want to achieve is to count cells with particular value in the grid.
here is what i have done so far;
Dim cellvaluescount As Integer = 0 For Each cell As DataGridViewCell In recordGrid.CurrentRow.Cells If cell.Value.ToString = "Absent" Then 'if cell value is Absent
but before that i must check the MIL value. If it is 39MIL i should write T5 first followed by the value from all 39MIL than if have 50MIL it should write T10 followed by all the value from 50MIL my output file will be like this
T5 40898 35899 34205 33537 120461 49324
[code]....
I try this code to split
Dim tfLines() As String = System.IO.File.ReadAllLines("C:file.txt") Dim sf As New System.IO.StreamWriter(drill, True) For I As Integer = 0 To tfLines.Length - 1
I have a few questions about the following 1.What purpose does the first line of MSDN example serve? ystem.Collections.ObjectModel.ReadOnlyCollection(Of String) Why use this? I tried reading about it on msdn, but i couldnt make much of it.
2. Why use CStr in the msgbox? For me it works fine without it with Strict on. am i missing something?
3. Am i making a mistake using my own version over MSDN example? I dont like using code that i cant understand, which is why i changed it in the first place.
VB.net 2008 express This is what I have so far, and it loads a list of files from a text file. Now I need to be able to delete them all from a certain drive and all sub folders in it. For instance I push the delete button and it goes through the entire list and deletes all the files in it from the designated drive and all it's sub folders.
Code: Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code "
I am writing a simple GUI for a 7-Zip command that will zip multiple directories, with two files in the working directory, to their own separate archives. The problem is that I have no idea on how to count the number if directories (only directories and not files) and find the name of just the first directory.Here is what I have so far:
I am wondering how to open a specific program with the textbox contents. Here is my situation: I want the text in the textbox to be saved to a html file and then open that html file in a specific browser.
I am using the following line of LINQ to drill down into an element. Is it possible to expands this code to drill further down so that I can add content to the <population> element in "Test2". I want to be able to do somthing like element.SetValue(1000000). However I need to expand the code below so that I can pass the entire query results into the variable called "element"'
Dim eles = From c In doc.Descendants("File") _ Where c.Attribute("Name").Value = "Test2" _ Select c
I created this code to export from DGV to Excel and it worked with me. I tried to print the data from DGV to specific cells in worksheet but I don't know.
How to read a string in another string where between Starting Index and first-encountered Ending IndexI have one giant file which contains info for each customers and they seperated the customers info with Starting and Ending Indexes and I need to get a specific customer info to display.
Dim oFile As New FileInfo(sFileName) Dim sFileContent As String = oFile.OpenText().ReadToEnd() Dim iStartIndex As Integer = sFileContent.IndexOf(roNotification.StartByte)
I have a directory searcher that is looking for dynamic groups.When I try to process the results it is taking 30 seconds to return the results.the ds.findall is very fast but when I try to find out the number of records returned or anything about the results it take the 30 seconds. So i am assuming that this is where the actual retreival of information is taking place.[code]
I have some .doc binary files stored in my database and i would like to now search them all (without converting them to .doc) to see which one contains the word "hello" for instance.
Is there any way to do this search in the binary file?
I've created a Setup project (in VB.Net 2008 Standard Edition) and I need to deploy some .rtf files in a specific folder for the user to edit. I've added these files to the project as content files but the Setup project installs them in Program File/MyApp along with the exe. As these rtf files need to be found easily by the user I need to specify a different folder on the hard drive. These are not mdb or xls files so are not used by the app itself. All the user needs to do is find them manually loading them into MS Word for editing. I don't need to load MS Word from the app, but I do need to deploy them so the user has access to them. How do I edit the file path so it does not bury them in Common Files or the User App Data or app folder itself? Ideally, since these are rtf files they could go in My Documents. (The app itself will work whether or not these files exist elsewhere.)
In one of my school assignments I am trying to count fields (that are strings) in a database and then publish them to the screen, however I can't seem to figure out how to count them.I've been trying to do something like this but I am having trouble with the bold part. I think the datatypes are the issue but if not this then what? What is a better way to try and do this?
Private Sub btnCalc_Click(sender As System.Object, e As System.EventArgs) Handles btnCalc.Click Dim numRep As Integer Dim numDem As Integer
in windows; when you right click over a folder you can know how many subfolder available (the total number) is there a way to get this number using simple code i am using vb2008
i have a form which is having 1 list view and a text box. list view having total 100 rows data list view is having a 5 column column 3 is having two words "yes" and "no" i just want to count the number of occurrence of the word "yes" in column 3 the total row can be count with this code: COUNT TOTAL ADMISSION Dim rowcount As Integer = 0
I have a datagridview in my project that is loaded with data from a SQL table when the form loads. One of the columns contains names of users in the database. I'm wondering what is the best way to the number of times a name appears in the column. For example, the user name "Rob Smith" might be listed 12 times in the column,I'd like to pass that number to a textbox.
How would you select the last part of a string starting at a specific character count. For example I would like to get all text after the 3rd comma. but I get an error saying "StartIndex cannot be less than zero."
Dim testString As String = "part, description, order, get this text, and this text" Dim result As String = "" result = testString.Substring(testString.IndexOf(",", 0, 3))
I want to make a little program that will count down the hours to a specific date. I.E. "Hours until: ##/##/##"
Like they do for new year and other big events in the world or whatever but I'm having big problems. I don't know how to use datediff to compare the difference in hours from 1 date to the next.
I need some advise how to get a specific file from a directory?for example i want to take all file that have name like "vid" from directory name "film" and in the directory,there are files like "vid12","vid232" how to get all file that have the word vid?
i have here a code that allows me to draw on a picturebox, but my problem is i want it to save on a specific directory for example: "C:image". how can i do this?[code..]
I am trying to copy a directory structure and .txt files to a duplicate directory in a different location.
Example: Source Location: \MyServerProjectsProjectA This directory will contain .txt files in the following locations that will vary from project to project. So the locations would be unknown going in. \MyServerProjectsProjectAdocsallfiles.txt