Interact with the local file system: Difference between revisions

From Starfish ETL
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
GotoNextRow
GotoNextRow
End If
End If
End Sub
</source>
=Move and rename a file=
I imported files directly into a Sugar instance's database.  The file had to be named the Knowledge Base Article's ID.  I moved and renamed the file as the KB article was create:
<source lang="vb">
Sub VBScriptProcedure
MoveFile "@@ORG:FullName@@","C:\uploads\@@STG:1,id@@"
End Sub
End Sub
</source>
</source>

Revision as of 17:58, 8 September 2015

Check if a file exists

Sub VBScriptProcedure
	If Not FileExists(AttachmentPath & "@@ORG:FILENAME@@") Then 
		GotoNextRow
	End If
End Sub

Move and rename a file

I imported files directly into a Sugar instance's database. The file had to be named the Knowledge Base Article's ID. I moved and renamed the file as the KB article was create:

Sub VBScriptProcedure
	MoveFile "@@ORG:FullName@@","C:\uploads\@@STG:1,id@@"
End Sub