PDA

View Full Version : windows system move command


lucille
09-24-2005, 10:11 PM
Hello--

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");


thanks--Paul

jtilden20
09-25-2005, 02: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!

-Jon

lucille
09-25-2005, 02:36 AM
Jon--

Thanks for the info--much appreciated--Paul

pk_pk
09-29-2005, 01: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");

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

thematt
10-03-2005, 05: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.



cheers

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

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