jnky Posted October 2, 2015 Share Posted October 2, 2015 G'day, I have an application which removes the read only attribute from a folder and all its sub-folders and files. I access this application with the startapp command in Civil3D via the acaddoc.lsp. All is working and why would I want to re-invent the wheel I ask myself. Well the thing is I have been dabbling in VB.net on a basic level outside of Autodesk products for some time now and think I now need to learn how to integrate. I believe the code below could be converted to DLL and accessed through the netload command but my attempts to date havent worked and Im looking for advice....thanks in advance for your help. Imports System.IO Module Module1 Dim C3DFolder As String = "c:\C3D" Sub Main() REMReadOnly(C3DFolder) End Sub Sub REMReadOnly(ByVal folder As String) If (System.IO.Directory.Exists(C3DFolder)) Then For Each filename As String In My.Computer.FileSystem.GetFiles(folder) System.IO.File.SetAttributes(filename, IO.FileAttributes.Normal) Next For Each foldername As String In My.Computer.FileSystem.GetDirectories(folder) REMReadOnly(foldername) Next End If End Sub End Module Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.