We have a small engineering department using Solidworks and PDM. The factory is in a separate building and does not have access to the PDM. We have a folder system on the network with folders for each product. We then have a subfolder for DXF files and a subfolder for PDF drawings.
I have created a macro that will create a DXF file of a Solidworks sheet metal part in the PDM. It will then create a copy in the correct folder in the Factory. It will also delete older versions of the DXF file as well as deleting the Laser Cut file for that part.
That bit works really well. The issue is that the same part can be used in different products. So I want to delete the old version of the DXF file and laser cut file in all sub folders on the network drive. I then want to copy the new version of the DXF file to all those subfolders where the old dxf was deleted.
Any ideas to do that fast? I am sure i can work it out but it will be slow in stepping through each folder.

by JSculley » Wed Nov 08, 2023 2:37 pm
Jacomuller wrote: ↑Wed Nov 08, 2023 1:01 am
Any ideas to do that fast? I am sure i can work it out but it will be slow in stepping through each folder.
Why do you believe it will be slow? Have you tested? With a C# macro I can retrieve and store the name of every file on my desktop and all subdirectories (5328 files in 739 directories) in 0.1 seconds.
Go to full post