Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files from NetWork to C: drive

Status
Not open for further replies.

Standing

Mechanical
Jan 14, 2002
1,578
With the new SolidWorks 2004 this may not be necessary. Do you want to copy files from a common network drive to everyone’s c:\ drive? You can write a Visual Basic 6 program that copies files to everyone’s C:\ drive. For example: SolidWorks always needed to have the macros in a macros directory on C:\ drive. Everyone gets a new executable in their Target: of his or her SolidWorks icon. \\Athena\Eng\Applications\SolidWorks\Executables\StartSolidWorks.exe
StartSolidWorks.exe is as follows:
‘ * * * * * * * * * * *
Private Sub Form_Load()
Dim CopySolidWorksMacros As String
CopySolidWorksMacros = Shell("\\Athena\Eng\Applications\SolidWorks\Executables\CopyFile.exe", 1)
Dim StartSolidWorks As String
StartSolidWorks = Shell("C:\Program Files\SolidWorks\sldworks.exe", 1) ' Run Copy Files program & SolidWorks.
Call cmdExit_Click
End Sub
‘ * * * * * * * * * * *

The main part of the CopyFile.exe is as follows:
‘ * * * * * * * * * * *
' Alt R - RevBox
FileCopy "\\Athena\Eng\Applications\SolidWorks\Macros_Programs\RevBox.swp", _
"C:\Program Files\SolidWorks\Macros\RevBox.swp" ' To:
‘ * * * * * * * * * * *

When I changed anything in the CopyFile.exe program it will run every time they double clicked on the SolidWorks icon. This program would also update any changes to the RevBox program.
To do this, takes no special software other than Visual Basic 6.0. One thing I do not advertise is the fact that I have control of what happens when they double click the SolidWorks icon. I could delete any file on their C:\ drive, but I would not.


Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor