Skip to main content

Move database using IDEA script

 
Hi Brain,
 
Is it possible to move particular database created during operation from IDEA project folder to sub folder using IDEA script? If yes, can you please provide some guidance or example script. It would be helpful.
Thanks,
Vijay

Brian Element Thu, 04/14/2016 - 09:24

Hi Vijay,

Yes it is. I copied this example code from the IDEAScript broswer:

Sub Main

	' Set the task type.
	Set task = Client.ProjectManagement
	
	' Create a new folder.
	task.CreateFolder "IDEATemp"
	
	' Move a file into the folder.
	task.MoveDatabase "Sample-Customers.IMD", "IDEATemp"
	
	' Move the file back into the parent folder.
	task.MoveDatabase "IDEATemp\Sample-Customers.IMD", "..\Samples"
	
	' Delete the temporary folder.
	task.DeleteFolder "IDEATemp"
	
	' Clear memory.
	
	Set task = Nothing

End Sub

 Hopefully this will get you going.

Brian