Solved

Deleting files on NTFS drive

Posted on 2002-04-11
2
159 Views
Last Modified: 2010-05-02
I have a VB 6 routine that deletes all files in a directory, copies blank FoxPro dbf files to the empty directory, fills the files with data, uses the files with a report writer.  On a Windows 9x system things work fine every time.  On a Windows NT/2000 system I can only fill the files with data once.  The second time I attempt to fill the empty data files, I get an error message stating that the field types are incompatible.  Any ideas what is going on?  Is there a special way I need to delete files in an NTFS Operating System?

Private Sub PrintMyReport()

Kill app.path & "\Reports\*.*"
Filecopy app.path & "\myfile.dbf", app.path & "\Reports\Myfile.dbf"
< fill empty dbf files with data >
< run the report writer >

End Sub
0
Comment
Question by:tanderson78
2 Comments
 
LVL 4

Accepted Solution

by:
WolfgangKoenig earned 20 total points
ID: 6936607
No,there is no special way but the security of an NTFS File system is enhanced. This can leading to that you must have the right privileges to delete files and that the file attribute 'write protected' is not set...
But i think your problem is another ...

WoK
0
 

Author Comment

by:tanderson78
ID: 6938175
You are correct that the problem was something else.  I had altered a database file and my fields were not matching up.  Once the fields in each table matched, the problem went away.  I assumed it was an NT issue since it worked fine on my 98 system.  The 98 system had the correct files.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now