Is there a way to get a list of all files in a folder but exclude a certain filetype/extension? Or is the only way to do it is to get all files & loop through them & exclude the filetype with an If statement?
Given an input string like the following:I, Need, Some, Coffee, Before, I, "Fall, Asleep" I need to split this into parts like so:
I Need Some
[code]...
Splitting on the comma character alone is easy enough, but how can I handle the quotationmarks? Regular expressions is not on my strong side, and I have been googling for quite a bit without any good results.
How can i go about associating my application with a filetype e.g *.safsg ? How can i get my program to open them file types when that filetype is double clicked on desktop for example.
In vb2010 I started getting an error message because I was still using FileListBoxes from VB6 and now they supposedly aren't supported in 64 bit systems. So I am replacing those with ListBoxes. I got the images to load fine into the list box using the FolderBrowserDialog. but (see the snippet below), I want to filter for several image types, not just one or a generic wild card which would pull in even non-image filetypes. This language will only accept one extension wildcard parameter it seems:
(sp is a string containing the folderbrowser dialogue path)
How do you associate a filetype, for example ".tkoen" (idk..), to the registry without restarting Explorer.exe for updating the filtypes..in Explorer.exe..?
the function to call the command filetype=jes. My calls to the ftp site arequote site filetye=jesasciiput filename.extquote site filetype=seqI have looked at the system.net.ftpwebrequest class and it works great for sending and files but need this one command to finish the call
I am trying to select a folder in a very similar way that we do using "OpenFileDialog". I searched for different sites and did find something but all of codes were tweaking "OpenFileDialog" and selected files..... I have seen applications where the select dialog box does NOT show the "File Type" as well as the "Open" button has "Select" name on it. Any idea how to get such dialogbox?
below i have a piece of code, i have to calculate the next working day +5 from today but this calculation has to calculate days from monday to friday and exclude weekends(saturday & sunday) and also excluse public holidays.i have tried but what i got is that it calculates 5days without excluding anything.example if a record is taken out monday, the return date must be the next monday but with this code calculates weekends as well it says return date is saturday.
Public Function AddWorkingDays(ByVal DateIn As DateTime, _ ByVal ShiftDate As Integer) As DateTime ' Adds the [ShiftDate] number of working days to DateIn
I have a string array Array1 and a string array A2. I want to combine these in a 3rd array A3 but excluding duplicate values. Can this be done through lambda expressions or only through iterating through the array and checking array.Contains()?
Is there any way to select items in a list that aren't contained in another? For example:list1 = From t In list1 Where Not list2.Contains(t.column1)That gives me the error:Value of type 'Integer' cannot be converted to '<anonymous type>'which makes sense, since list2.Contains is expecting the same type as list2. However, the list types are different. I want only to select based on column comparisons.
I am uploading Excel File and below is my code. I have no problems so far with filling my dataset but when I tried to validate required fields, I get the error that some values are missing. I checked the Excel files and noticed that there are hidden rows that the user was not able to checked when he's adding values.[code]...
The below code imports my CSV file into the data grid. Only issue is it populates the header with a row from the CSV file, I want the header to be left blank and rows to be imported after it.[code]
I want to select all text in a richtextbox excluding any images in it.richtextbox1.SelectAll() will select all objects in the richtextbox not only the text
I am trying to compute time off, I have a datetimepicker which allow user to select a day he wishes to start leave and a textbox to specify no of days applying for.Now I wand to use dateadd function to calculate resumption date excluding Weekends.
VS 2010, VB.NET, WINFORMS. In my app i have a need to import foxpro database tables and exclude the deleted records. The problem is that FOXPRO tables keep deleted items inside the same table. I have tried using DELETED=NO in the connection string but vb throws "Format of the initialization string does not conform to the OLE DB specification."
My function is as follows:
Dim _DBConn1 As String = "provider=vfpoledb.1; Data Source = " & file1 & ";DELETED=NO" Dim _DBConn2 As String = "provider=vfpoledb.1; Data Source = " & file2 & ";DELETED=NO" Dim _DBConn3 As String = "provider=vfpoledb.1; Data Source = " & file3 & ";DELETED=NO"
Google results pointed me in the direction of DELETED=NO but its throwing that exception error now that I have added it..
Apparently, filetype refers to the extension of the program. But I do not want it to read .exe and .lnk programs. So how can I include this "If Else" statement into the one stated above?
The situation: when i build my project (or publish) Visual Basic 2010 makes and exe and a couple ddl files. when i run the project with the .exe and the other files the program works perfectly.
My problem: I want to share it with friends and it is just a verry little program ( a n internet radio) so i want it to be 1 .exe with out any other instalation needed so i can easly share it to anyone who wants it. when i make an even smaller program and Debud->build it, it is only 1 exe and no instalation needed. so is there a way to make my program to 1 exe only?
I am not able to find the Exclude Command in VB 2010 Express. I have no idea which version of Visual Studio it is working with. I've got one 217MB VB 2010 Express file and many 2008 VB Express files with one of them measuring 31 MB. There many other SQL files and .Net Files.
I need to list all files folders, subfolders and subfolder files under a selected directory in a list box not sure how to do the logic in the last amount of code lines to enumerate all subfolders dna files.Here is what I have so far:
Dim OldProfileDir As String Dim NewProfileDir As String Dim Newdocs As String = "" Dim Olddocs As String = ""
I am using the following code to FTP upload files. I need to amend the code so that it uploads all the files in a folder rather than one set file as it does at present..
UploadFile("C:UsersUsernameDesktopDivinerDatadata01.sdb", "ftp://**my ftp server**/diviner/data02.sdb", My.Settings.User, My.Settings.Pass)Public Sub UploadFile(ByVal _FileName As String, ByVal _UploadPath As String, ByVal _FTPUser As String, ByVal _FTPPass As String)
i am trying to print a pdf file.. i have acrobat reader in my pc and i have managed to open the pdf file inside the form i created in VB. When i issue the print command, the print dialog box of acrobat appears.If i input 1-4 in page range of dialog box, it doesn't print pages 1-4. I thnk the information i input at the print dialog box is not forwarded to the printer.
I am doing this because im making a project which can print documents as well as accepting payment thru the coin slot.
I have been working on a program and I need it to unzip a zip file. I tried handling a zip file as a directory but that didn't work.It wouldn't hurt if I could compress files into a zip file to! But I need unzipping the file first.This is my code handling it as a directory:
Dim count As Integer = Directory.GetFiles(My.Application.Info.DirectoryPath & "Games" & game & "�00.zip").Length MessageBox.Show(count)
It has an error saying it is not a valid directory name.
Public Function CompressFile(ByRef file As String, ByRef destination As String) As String 'Make sure user provided a valid file with path If IO.File.Exists(file) = False Then
[code]......
But I can't manage to ZIP more then one file! I've tried using an arraylist.