Settings And Delete A File?

Jan 5, 2011

I have a little problem with my code. Or i'm doing something wrong. Take an look at it Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Kill(My.Settings.Folder + "*.txt") End Sub

I want it to delete all files with the .txt extension.

A folderbrowserdialog saves the folder to My.Settings.Folder.

But for a weared reason it doesn't delete anything.

Does somebody know the answer to this.

View 9 Replies


ADVERTISEMENT

How To FileInfo Before, Delete Or SHIFT + DELETE, Process Final Delete Of File

Feb 13, 2011

How can be find out which file is going to delete when, user provides command like DELETE or SHIFT + DELETE or by programmatically gives DELETE command. Well I know about FileSystemWatcher Class, but this class doesn't provide information before delete...

View 1 Replies

How To Delete Settings

Dec 1, 2010

how do i delete settings?

EXAMPLE:

me.setting.history

a button that deletes all history.I like..... Understandable Answers 1 2 3 4 5 - - - - - Rate yourself And Have A Kitkat 5 5 5 5 5

View 3 Replies

VS 2010 - My.Settings - Can't Find File Which Reflects Changes To User Settings

Apr 15, 2011

1. I can't find the file which reflects changes to user settings. This might be because I just can't find it (I can see a bunch of user.config files but they are all empty - weird!), or...

2. I'm not actually saving them when I think I am.

Regarding 2. - do I need to invoke

Is this all I need? And if so, why are my user.configs empty?

View 1 Replies

VS 2008 Settings Are Read From App.config Instead Of Settings-file

Oct 30, 2009

I have created a settings-file for my plug-in-based app. When the mainApp writes the settings to the file, the pluginApp should read the settings from the settings-file (when opening or at runtime even better), but somehow it reads the settings from the app.config-file. This means that the pluginApp never will read the settings according the values of the file.

View 4 Replies

VS 2008 Using 'Settings File' (Settings1.settings)

Aug 5, 2009

I saw that you can also use a "Settings File" (Add new Item)to add your settings instead of the application settings. But I can't seem to write any values to the file. Someone with experience with the "Settings1.settings"?

View 2 Replies

Properly Delete A File Using File.Delete()?

Mar 9, 2008

How To Properly Delete A File Using File.Delete()

View 5 Replies

VS 2008 - My.Settings File - Specify The Location For User.config File

Jan 3, 2010

I'm looking for a way to specify the location for the User.config file that is used for storing the My.Settings object. It appears that this is not possible. The problem for me is, I don't want to be responsible for creating several different files on the users computer that really have no use and are difficult to find and clean once an update is released. For most users, this is not a serious problem, as many will probably never update the software, and most will probably only go through a couple of updates. On my system, there are config files for every build of the application, and the same to a lesser extent will be true for my beta testers.

I can understand that MS wants to make sure that no two applications will use the same location for storing application data, but a simple [UserData] [CompanyName][ApplicationName] for storing application data will probably suffice for 99.9999 percent of the legitimate applications in the world. Bogging a user's system down with erroneous files, no matter how small, is an unnecessary drain on system resources and a potential source of problems for the user. It's bad enough that most programs leave bits and pieces of themselves all over a user's system after De-installation - this to me seems only to exaggerate this problem.

Is the only way to get around this problem to write a whole new Settings Class? Is there a way to change the location of the UserConfig file to a more friendly (and more predictable) location that I am not finding for myself? It would seem that having at least the OPTION to specify a location for the User.Config file would be OBVIOUS and easy to implement, so why did they leave this out?

View 5 Replies

Read And Save Ini File (settings File)

Jan 8, 2011

before i use VB6 i was make multiple file for each settings, i try load my VB6 into VB.NET 2008 and code show like this

Code:
FileOpen(1, My.Application.Info.DirectoryPath & "path.ini", OpenMode.Input)
Input(1, home1)
myWeb(X).Navigate(New System.URI((home1)))

[Code].....

so each form load will read ini file, and form close save ini file

View 1 Replies

Create A File Removal Which Revieve Directory Files To Delete From Text File

Feb 8, 2012

I want to create a file removal which revieve directory files to delete from a text file..[code]

View 2 Replies

Windows Xp - Get Full Permissions To Modify Boot.ini File And A Registry Value And To Delete A File

Jun 13, 2010

i am working on an application called logonscreenchangerxp i made my program and when i run it on xp virtualmachine i get errors the program is made using vb 2008 and using .net framework 2.0 i am not able to get full permissions to modify boot.ini file and a regisrty value and to delete a file

View 5 Replies

Delete The Transaction From Listview And Text File(temporary Log File) Using Button

Jun 6, 2011

Below is my code for DELETE button. What i want is if the user select the transaction from the listview and press the DELETE button it must be able to delete the transaction from listview and text file(temporary log file) which i keep all the transaction record. At the same time the list view must able show the total current balance from the deleted trnsaction.

[Code]...

View 11 Replies

File Info - Pass Delete And Copy File Method On A Button?

Jul 22, 2011

i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.

[Code]...

View 8 Replies

File I/O And Registry :: Code A Delete Button For A Browsing Program Based On Data From A Txt File?

Dec 3, 2010

I am trying to code a delete button for a browsing program based on data from a txt file. I have coded the buttons to sort(ascending and descending), append to the text file, search the text file, but I can not seem to get the delete function working. I am using VB 2010, this is what I have so far:

Code:
Dim deleline As String
Dim line As String
Dim isFound As Boolean = False
sr4 = IO.File.OpenText("Students.txt")

[code]....

View 2 Replies

IO.File.ReadAllLines - Doesn't Go "/Settings.ini" Just Instead "C:/Settings.ini"

Sep 30, 2009

Im just wondering whats wrong with this line vb Dim lines As New List(Of String)(IO.File.ReadAllLines("/Settings.ini")) Well its working.. But it doesnt goes "/Settings.ini" just instead "C:/Settings.ini".. But I type "/Settings.ini".. how make it local folder?

View 2 Replies

DGV Bound Data Save To File, Load From File, Delete Row?

Apr 1, 2009

[VB 2008 express edition] i am doing a application data grid view bound data from MS access (.mdb) as my dataset. the dataset have 5 tables, each table consist of ID, Items, Rates, And Amount, i face some problem here:

a) cannot delete row from the table, (using binding navigator but error)
b) how can make a opendialog to load the .mdb file dataset table in to the datagridview?
c) how do i save table in the datagridview into the MS Access file ?

View 4 Replies

File Rename - A Message Saying OldPathName Is Being Used By Another Process, When It Tries To Delete The Old File?

Dec 12, 2006

I try to rename a file by

file.copy(oldPathName, newPathName)

then

file.delete(oldPathName)

File.copy works.But somehow, a message saying oldPathName is being used by another process, when it tries to delete the old file.

View 5 Replies

Recovery File System - Return Any File Delete Or Replace

Apr 13, 2009

I have Project i need to recovery file System . And some information who Create that file , deleting , replace , Modifying . I need also return any file delete or replace .

View 2 Replies

The Process Cannot Access The File During System.IO.File.Delete(filename)

Apr 7, 2007

I encountered the error:The process cannot access the file <full file path> because it is being used by another process.during System.IO.File.Delete(filename)I have opened the file using:pctPhoto.Image = Image.FromFile(filename)before I delete the file.

View 8 Replies

Write The File Path In The Textbox And Delete Some File?

Dec 2, 2010

i know how to do it but is this even possible in vb. get a textbox and a button.write a file path to something you want to dlete in the text box then press the button and the button deletes the object the file path has specified.and you

View 2 Replies

File Associations With Settings?

Jul 21, 2011

I know there are allot of toppics about this subject, but i cannot find really what i need.

i need a file associations with settings.. so when you click for an example: "PC0210.config" it will start my program with some settings inside the "PC0210.config" File.

Lets say my program needs to give a message box with the PC name when you click the PC0210.config file.

that inside the PC0210.config file is something like: pcname="testPC"my program popsup with: testPC

View 6 Replies

How To Read A Settings File

Mar 23, 2011

Heres what I need:

1. A way to save settings (Exp.: userkey=randomkey)

2. A way to than read these settings from inside the form.

3. A way to convert settings to strings.

4. A way for users to edit settings

5. No external files.

View 5 Replies

Save Settings In .ini File?

Oct 30, 2010

i know about the My.Settings but i need to know how to save all the settings in a .ini Text file for example I GOT A SOURCE :: BUT THE GET SETTINGS DOESN'T WORK || Save settings DOES work

[Settings]
Textbox1=Name
Textbox2=Last

[Code].....

View 1 Replies

Save Settings In A Xml File?

Mar 14, 2010

lets say i have a checkedlistbox in my program and i want to save everything that is checked in an xml file so it will be checked again when i start up the program the next time, how can i do this ?

View 6 Replies

Save Settings Into Xml File?

Sep 25, 2009

I am working on a file explorer, and I want to save the view settings of each folder, like the icon size, font size, ect.. I was thinking of using an xml file to save these settings.

View 1 Replies

Save Settings To File?

Mar 27, 2010

How can I save a few settings to a file for my application? Its just whether the orientation of the document is landscape or horizontal, the zoom level, and the current font. Would an XML file be best?How can I create, write to and read one?

View 12 Replies

Settings - FTP An .xlsx File

Mar 3, 2010

I am trying to FTP an .xlsx file. I have to code uploading the file, but it is uploading it in a zip folder. how I can fix this? Is it a setting I am seeting with my code, or is it a setting the the FTP page itself? The code shown below is the code i am using to FTP the file. It was posted to my other thread by bdbodger.

[Code]...

View 1 Replies

Use XML File To Save Settings?

Aug 9, 2008

I have created a new XML file that save the settings of the application built using visual basic 2008.[code]...

View 3 Replies

Use XML Or INI To Save Settings In File For Whole App?

Nov 1, 2010

I've been trying to create an app with vb 2010. People are able to change settings (through the apps settings screen), then the changes are being saved to a file (the settings are being used in the whole app). Now my question is, what is the best way to save the setting in vb 2010:
XML or INI?

View 6 Replies

Using An .ini File To Store Settings?

Feb 26, 2009

I am using an .ini file to store my settings, so they are editable. But the thing is, it wont redirect? I had it working some minutes ago, but now, it just gives me a white page.. It didnt do that some minutes ago Here is my whole code, as it would take time to split it all that has with .Ini file to do.

[Code]...

View 8 Replies







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