473,382 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Delete Text File

I Have a text file that I want to delete using the On Click event of a forms
button, the text file is along the following path:

C:\1.txt

I have managed to create the text file from Access using DoCmd.OutputTo, I
can change the text files attributes using SetAttr, but I don't know the way
to Delete the text file?

Any help would be appreciated.
Jul 7 '06 #1
2 6882
Kill

as in

Kill "C:\1.txt"

or
Call Kill("C:\1.txt")

--

Terry Kreft
"Pipex News Group" <ia********@ntlworld.comwrote in message
news:3t*******************@newsfe4-win.ntli.net...
I Have a text file that I want to delete using the On Click event of a
forms
button, the text file is along the following path:

C:\1.txt

I have managed to create the text file from Access using DoCmd.OutputTo, I
can change the text files attributes using SetAttr, but I don't know the
way
to Delete the text file?

Any help would be appreciated.


Jul 7 '06 #2
Thanks Terry thats exactly what I want, I owe you a beer.

"Pipex News Group" <ia********@ntlworld.comwrote in message
news:3t*******************@newsfe4-win.ntli.net...
>I Have a text file that I want to delete using the On Click event of a
forms button, the text file is along the following path:

C:\1.txt

I have managed to create the text file from Access using DoCmd.OutputTo, I
can change the text files attributes using SetAttr, but I don't know the
way to Delete the text file?

Any help would be appreciated.


Jul 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Frank Maestas | last post by:
Hello, I have a company MySQL database containing e-mail addresses. Some of these addresses are bad. I have a text file with the addresses I need to remove from the MySQL database. Is there a...
6
by: Poppy | last post by:
I use the following code to append a line of text to a text file : Dim myFILENAME As String = Server.MapPath("/ABACUS/cvdocs/" & fileName) Dim objStreamWriter As StreamWriter objStreamWriter =...
2
by: GMK | last post by:
Dear all in my asp.net application i have a text file that is installed with my application on the server. this text file is filled with data through a web interface in my application. i need to...
6
by: Percy NG | last post by:
Hi ... I have text file contain such data 1111222233334444 i need delete particlar char without load all data into memory says delete 1st-5th char ..then the data in text file should...
6
by: tomtown.net | last post by:
Hello I'm trying to get a single line removed from a text file using a search pattern (pretty simple: if line contains "NODE1") -> remove line). To achieve this I's like to operate with only the...
2
by: cdun2 | last post by:
Hello, I have some code that reads each line of a text file, and if a line is found where the length of the string in the line is 384, it writes the line to a text file. The other step that I...
1
by: Osoccer | last post by:
...to a different folder and in the relocated file concatenates all of the lines in one long string with a space between each line element. Here is a fuller statement of the problem: I need a...
6
by: 000dreamsound000 | last post by:
Hi I need help with to access a text file over my local network. I need to be able to create,read, write and delete the txt file on a specific machine(s) from any computer over the network. The...
4
by: vitaminz | last post by:
Hi it's me again, I've pretty much finished a program I'm making, which does the following: The program is for a garage, and it does the following functions: Adds a new car Display cars Amend...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.