I've been working on a file management system recently, and wanted to check what the most efficient ways you've dealt with the comparision, copying and moving of files has been. I've been using a combination of max file commands and DOSCommand to do copies most of the time, but having minimal experience with dotNet, I thought it might be better that way.

Here's the deal:

The user has the option to save as normal or do a server backup (as in copy their max file and textures to the server).
On runtime, the script checks to see if a previous version exists and if so prompts the user whether or not they want to copy over it (this is hand-coded to show comparison dates currently).
The script then backs up the original server file as a copy in another folder (sort of an undo process just in case), before copying the local file to the server.
I've yet to write the texture part, which would be easier to just do with an XCopy, but if dotNet can access standard explorer copy/paste with prompts etc I thought this would be a lot more user-friendly.

The alternative is python, but i've yet to convince my team leader about installing it. :D

RustyKnight

10-16-2007, 02:50 AM

Doesn't max have support for version control??

Which version of max are you using??

Personally, I'd prefer something with a bit more grunt with file handeling then maxscript really provides (it's good for what it does).

Python probably would give you more control and flexibility in the long run to grow and expand your ideas...But I have no experience with that side of things...

Shane

erilaz

10-16-2007, 04:25 AM

We're presently not implementing vault. This is more of a smalll server backup prodcedure than a version control system, ie. a tool to shortcut copying the assets manually.

We're on the latest and greatest (soon to be 2008 if shipment dates are correct).

erilaz

10-17-2007, 04:48 AM

Has anyone implemented system.io file copy dotNet into their scripts with much success?

ypuech

10-17-2007, 08:06 AM

Has anyone implemented system.io file copy dotNet into their scripts with much success?
Are you talking about File.Copy() method or about a much general way of doing such server repository ?
You can use File.Copy() like this:
File = dotNetClass "System.IO.File"
File.Copy "C:\src.txt" "C:\dest.txt"

erilaz

10-17-2007, 12:02 PM

Are you talking about File.Copy() method or about a much general way of doing such server repository ?
You can use File.Copy() like this:
File = dotNetClass "System.IO.File"
File.Copy "C:\src.txt" "C:\dest.txt"

Ah! Great, I was implementing it the wrong way. Thanks!

At this stage i'm just testing some different methods for efficient file copying and moving, but the main use of the tool i'm creating is for backing up the scene and it's textures to the server, to save the user from doing it manually. Although I could do a straight batch copy, since more than one user may use the files, I need to have the normal "Is is okay to copy over this file?" prompts etc.

Eventually we'll probably shift over to vault or svn, but this is more to keep our archives up to date. It's a small team with managable projects, so vault seems a little excessive, but it will probably help us in the long run!

PEN

10-17-2007, 12:42 PM

Have you looked at copyFile in Max script. You would have to impliment all the file testing and handling how ever. I think that the dotNetControl might be the best way to go as I would assume that it is more robust. xcopy certainly works well and I still use it all the time from a dos prompt but it kicks open a dos window and that just gets a little messy in my opinion.

erilaz

10-17-2007, 11:39 PM

Have you looked at copyFile in Max script. You would have to impliment all the file testing and handling how ever. I think that the dotNetControl might be the best way to go as I would assume that it is more robust. xcopy certainly works well and I still use it all the time from a dos prompt but it kicks open a dos window and that just gets a little messy in my opinion.

I'm presently using copyFile, and I don't like it for the very reason you just specified: I have to write all my file checks, overwrite prompts and so forth. And xcopy is for exactly the same reason. A big dos window in the artists' faces scares them. :)

CGTalk Moderation

10-17-2007, 11:39 PM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us