How To Find Application Data Files
Dec 3, 2010
I'm trying to find a good strategy to access data files, image files, etc., that I want to distribute in my VB.NET deployment. The challenge I'm having is to find a place to put the files, and a means for the program to find them, regardless of whether the program is running in the Visual Studio environment as a debug build or release build, or running as an installed application.I've considered using AppDomain.CurrentDomain.BaseDirectory to find the location of the EXE file, then using relative paths to that folder. However, that approach depends on the directory hierarchy imposed by the Visual Studio tools when it separates the binaries of debug and release builds. Both builds would have to navigate upward to reach a common root folder, and the path traversal algorithm must work for the deployed EXE file too.
View 6 Replies
ADVERTISEMENT
Dec 1, 2010
VB.net 2008 build and publish.The application cannot publish as it cannot find the files. I down loaded the MS exe that installs it, but, I need to load them into the same folder as the install package.I looked at the folder: Microsoft SDKs/v6.0Aootstrapper/packages and transferred the folders but they do not contain the files.One of the errors on build is as follows <error> Error32The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35dotNetFX30NetFX30a_x86.msi' in item '.NET Framework 3.5' can not be located on disk. See Help for more information.WindowsApplication1.
View 5 Replies
Dec 7, 2009
I have a vb.net program that initially finds the directory where application data can be stored with the following command.[code]....
View 4 Replies
Feb 24, 2012
how to find data using search command in my form application like searching a name in my database?
View 1 Replies
Apr 8, 2011
I have added some files that I need to be downloaded to the Application start up path. So I set Build Action as content now the files have been copied some where [code]...
How can access file from the application.
View 1 Replies
Apr 8, 2011
I have added some files that I need to be downloaded to the Application start up path. So I set Build Action as content now the files have been copied some where
C:Documents and SettingsTestUser.ANNAMLocal SettingsApps2.0DataHVDRBMY5.8AA858AT9VM.TNP est..tion_2d7cfc137d9c2c74_0001.0013_432bd4561850d290Data
How can access file from the application. My problem since it is a dynamic path will it be same folder count so that we can use like ....Data Some think like this
View 1 Replies
Apr 4, 2011
I am using VS2008(VB.NET) and SQL Server2000. I want to make an application which reads files and Insert Data into SQL. If first file has some error. Write into log and Move Next file for Proceed. How can I do that.
View 3 Replies
Jun 26, 2011
Using: VB 2008 Express?I created an application that connects to my MySQL, and everything works fine, but...
1. On my development computer, Windows 7, 64bit, I add the MySQL.data.dll file as a reference. I publish the program, run the setup.exe, and sucess.
2. I then copy my published folder to my test computer, Windows Vista 32 bit, and upon running the setup, the program fails to work because it cannot find the Mysql reference.
3. I then transfer my entire project over to my Vista computer, publish the program, run the setup.exe, and sucess.
4. I finally found out what was happening. My Windows 7 comptuer was not including MySql.Data.dll.deploy file in the Application Files published directory; but when I compiled it on the Vista machine this MySql.Data.dll.deploy was included.
So, in the end, I cannot compile the program on Windows 7, because it fails to create the .deploy file, and use it on Vista or XP (for some reason Win7 doesn't need this .deploy file?); but I can publish it on the Vista machine and install it fine on Windows 7, Vista, or XP. My targe CPU setting is Any computer.
View 3 Replies
Jan 8, 2009
I am using Datagridview and ListView Controls in my windows desktop application using vb.net.I want to Import data directly to Excell sheet and CSV file directly from form.
View 3 Replies
Jun 20, 2009
I am just learning Visual Basic and I am following along in a book called "Build a Program Now!".I have an application that is calling a database in SQL and there are instructions for copying the .mdf and .ldf files from the bin folder to the project folder that should allow any changes made in the running application to be reflected in the rows of the database.I have copied the files as per the instructions, but the changes are not showing in the database.
View 2 Replies
Apr 8, 2009
I am trying to deploy my first application using vb. I have tried to use the one click but here is my problem.
I have a group of data files, some *.txt and one access data base (*.dbf) that I need to have placed in a folder (that is created) located at c:monitor.
how to do it in either the one-click or in a setup project.
I would also like to have a condition that if the files exist that they are not overwritten with an updated installation.
View 2 Replies
Jun 3, 2010
I have a SQL Server table with a list of files (path + filename), and a folder with multiple layers and files in each layer. I'm looking for a way to reconcile the two without having to process the list twice. Currently, I'm doing this:
For Each f as FileInfo In FileListFromDatabase
If f.Exists is False, mark it as deleted in the database
Next
[Code]....
Is there a better way to do this? I'd like to avoid converting all the matching files (of which most will be) to FileInfo objects twice. Since I'm a T-SQL developer first, I'm picturing something like an OUTER JOIN of the two lists where they don't match. Something LINQ-ish?
View 1 Replies
Feb 10, 2010
how I can search a folder of csv files to find out if one of the csv files has a particular name in ?I'm currently searching a folder to bring back all csv files using the code below and this is working fine.
[code]...
But now I want to take it a step further and actually search within the files themselves.
View 2 Replies
Jul 24, 2009
I have come up against another brick wall I have a large number of .csv files which are located within subdirectories of lets say the "c:emp" directory. What I need to do is find all of these csv files, open them individually, perform an operation on each and then close each one.
What I am struggling with is the part where I find all of these csv files. What I would ideally like to do is search through each of the subdirectories, return a filename (including complete path) as a string which I can then use in my code to open the files individually and perform the operations.
View 3 Replies
Apr 29, 2012
This is how I currently find the ID3 Tags in a .mp3 files, but is there a way to do it that doesn't involve Byte arrays?
Private Sub GetID3Tags(ByVal Path As String)
Dim Stream As IO.FileStream
Dim Title(30) As Byte
[Code].....
View 1 Replies
Oct 21, 2008
I want to make a program that scans a website to find an extension (.png), then tells me all of the files with that extension on the server.Which displays them in a list box. so lets say the website is
[URL]
and i need to find the files, but file browsing is off on the server.So I pretty much need a web crawler. How can i do this?
View 3 Replies
Jan 9, 2010
How to find all files from a folder and from all sub-folders?
View 4 Replies
Oct 26, 2010
Dim ListOfFileTypes() As String
Private Sub ListFiles()
' an array to hold the file types I am searching for
[Code]....
View 1 Replies
Apr 9, 2010
I've created a button and textbox which allows me to do an openfiledialog and select multiple files. The problem is, after selecting multiple files, when I run the program it doesn't run through all files selected, just the first file. I know I'm missing an integral part of code here, but not sure what it is.
For testing purposes I've created similar code and output to a textbox shown below. I would expect that each file selected by multiselect would appear in the textbox provided.
Dim OFD As New OpenFileDialog
OFD.Title = "OFD"
OFD.InitialDirectory = "C:"
[Code]....
View 2 Replies
Apr 1, 2010
I don't know enough about VB.Net (2008, Express Edition) yet, so I wanted to ask if there were a better way to find files with different names but the same contents, ie. duplicates.In the following code, I use GetFiles() to retrieve all the files in a given directory, and for each file, use MD5 to hash its contents, check if this value already lives in a dictionary: If yes, it's a duplicate and I'll delete it; If not, I add this filename/hashvalue into the dictionary for later:[code]Is this a good way to solve the issue of finding duplicates, or is there a better way I should know about?
View 2 Replies
Mar 15, 2012
Am getting below error, the program cant seem to find some custom dll on my project when installed. in the setup and deployment i check only 'primary output source from myapp'
[Code].....
View 14 Replies
Jun 10, 2010
I'm making a Cleaner for my PC that could delete all files with a specific name.So I have all the names in a .txt file, like:
A
B
C
D
Now I need somekind of function that would search in a directory ( The user gives the dir. in a textbox ), and its important that it would also search in all sub folders and see if there is a match to any of the names in the .txt file. And it shall not care about in what format the file is. It can be in .exe , .txt or any format.
View 10 Replies
Feb 25, 2011
Every time I compile my application, during install I get the error:Cannot download application, the application is missing required files
View 3 Replies
Dec 8, 2010
i am new to visual basic and have recently made a quiz with 16 forms. I have built the project but when I attempt to email it (with hotmail) the person at the other end recieves it but then as he recieves it the following message is displayed "Cannot download the application. The application is missing required files. Contact application vendor for assistance."
View 1 Replies
Feb 10, 2010
I published an application and copied the Application Files Folder ,setup.exe and .application file to a network folder for others to install on their machines. What causes this message to appear. Should'nt the new version over write any previously installed version on a machine. Although in this case no other version has been installed. You cannot start application...from this location because it is installed from a different location
View 1 Replies
Jun 29, 2011
I need to mdify the code below to capture all files in all directories and write them to a grid
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
get files from current directory
Dim Files = From file In My.Computer.FileSystem.GetFiles(CurDir)
[Code]...
View 7 Replies
Apr 3, 2012
I need to find a good control for VB.Net to upload big files to an FTP server:
Can upload files up to 10GB
Uses passive mode
Provides feedback during upload, to make sure it's going OK
Can cancel and resume
Up to two concurrent connections
I read about WebClient + NetworkCredential, but it doesn't seem to provide progress infos. There are also the FTPWebRequest/FTPWebResponse classes from WebRequest/WebResponse, as well as WebClient.UploadFileAsync.
View 1 Replies
May 12, 2012
I am attempting to make a text editor. I have a folder which contains hundreds of text files. I would like to search through all files simultaneously, for some text then replace the text with other text & save, & overwrite originals. I've got most of the basic structure done, but I've go no idea how to search for text in all files in a folder.
View 13 Replies
May 16, 2011
I (through a ton of help from everyone here at stack-o) have created a small WCF which is hosted as a Windows service using TCP..Last question for this little bugger; it's time for deployment. In my solution, there are 3 projects. One is the Windows service, another is the imported WCF, and finally a setup project I added for install.I can install/uninstall the service on my machine by going in the solution directory and finding "Setup.exe" or "Setup.msi". Executing either from explorer will install the service on my development box.Now there are a few directories associated with this solution. I'm betting that simply copying setup.exe or setup.msi to my target server and trying to run it will bomb out. How can I find out exactly which files/folder I will need to copy over for deployment?Or should I just copy the entire solution directory? That will be a little difficult for my coworkers as the setup routines are nested in directories 5 deep.
View 3 Replies
Nov 5, 2011
where can I find VB resources, like graphics, sounds, & other related files?
View 6 Replies