Move database using IDEA script

3 posts / 0 new
Last post
Walkaway
Offline
Joined: 10/09/2015 - 10:48
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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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

Walkaway
Offline
Joined: 10/09/2015 - 10:48

Thanks Brian.