Solved

Deleting files on NTFS drive

Posted on 2002-04-11
2
162 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

776 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