Book a Demo

Author Topic: Transfer project and local files  (Read 2557 times)

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Transfer project and local files
« on: August 07, 2007, 04:55:08 pm »
Hi all,

I am setting up a repository for a client which will eventually be in DBMS but, until they get the DB setup, I am working remotely in an EAP file (not at clients site). I am cool with transfering the project into the DBMS but have a question regarding local files referenced by an element (via files tab/local file). Obviously the local file path refers to a path on my local machine which will not be the same on the production machine. I am assuming the project transfer will just simply copy over the path as is. Is there any way also transfer all referenced local files to a specified directory? I suspect I am dreaming and will have to manually copy the files and directly edit the locations in the tables after transfer.

Any thoughts?
Cheers, Mark

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Transfer project and local files
« Reply #1 on: August 07, 2007, 06:38:01 pm »
You could do an SQL update on the t_objectfiles table....

If SQL Server....

update t_objectfiles
set filename = '<new path prefix>' + substring(filename, charindex('<old path prefix>', filename), 255)
where filename like '<old path prefix>%'

There may be other places "links" are stored... search on filename or link in the syscolumns table to find them

Cheers,
DAvid.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: Transfer project and local files
« Reply #2 on: August 07, 2007, 07:47:36 pm »
Thanks, David.
Yeah, that's what I meant by "directly edit the locations" - never do by hand what you can script.
Good tip about the syscolumns table, thanks.

I was hoping the Local Paths feature in EA would be able to cope with it but evidently not (it's only for source code files and version control so it would seem).  Would be nice if you could specify a file path by using the defined local paths as you can with source code files.
Cheers, Mark