XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : windows system move command

09-24-2005, 09:11 PM

I can't get windows move to work like a unix "mv"

I am trying

system ("move" + "C:\MAYA\Scripts\poseSelect\tmp1.mel" + " " +"C:\MAYA\Scripts\poseSelect\tmp2.mel");


09-25-2005, 01:28 AM
Hey Paul,

The windows move command works slightly different than unix...
move [source file] [destination dir]

In your mel code, try something similar to this:
system ("move \"C:\\MAYA\\Scripts\\poseSelect\\tmp1.mel\" \"C:\\MAYA\\Scripts\\poseSelectNEW\"" );

Looking at your code though, it looks as if you're simply doing a rename. If thats the case, try the 'rename' command in windows ('rename /?' at the shell for a man page).

Please take note of the delimited backslashes for the window's paths, as well as the delimited quotes. if you have trouble with the slashes, read up on the 'toNativePath' and 'fromNativePath' commands. Additionally, Maya has some built-in commands under 'sysFile' to handle basic copies, moves, mkdirs, and (I think) renames. Hope this helps!


09-25-2005, 01:36 AM

Thanks for the info--much appreciated--Paul

09-29-2005, 12:48 AM
system ("move" + "C:\MAYA\Scripts\poseSelect\tmp1.mel" + " " +"C:\MAYA\Scripts\poseSelect\tmp2.mel");

i noticed that there is no space between the move keyword and your file path.

system ("move " + "C:\MAYA\Scripts\poseSelect\tmp1.mel" + " " +"C:\MAYA\Scripts\poseSelect\tmp2.mel");

10-03-2005, 03:07 PM
Thanks all--I have setteled on mel's 'sysFile' "copy" for its simplicity and cross platform

10-03-2005, 04:45 PM
sysfile works but only for the file inside a folder not the folder itself..so it's good to know both way might be helpful sometime.


10-04-2005, 04:31 AM
good catch--thanks

CGTalk Moderation
10-04-2005, 04:31 AM
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.