Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Deleting Files Using MEL Command?
  RSS 2.0 ATOM  

Deleting Files Using MEL Command?
Rate this thread
 
35039
 
Permlink of this thread   Subscribe to this thread
avatar
  • atprod
  • Posted: 29 September 2009 04:38 PM
  • Total Posts: 1
  • Joined: 28 August 2006 08:15 PM

I have a sequential series of .iff files numbered ship.001.iff through ship.240.iff
I can always delete them one by one: sysFile -delete “/Users/ship.001.iff”;enter
Does anyone have a MEL script for deleting the entire sequence with a single command?
Thanks.



Replies: 1
/img/forum/dark/default_avatar.png

I thought about it for a wile, I couldn’t find better solution according to my knowledge

for($i=1;$i<250;$i++)
{
string $is=$i;
string $d;//zeros before the number

if (sizeBytes($is)==1)
$d="00";
else if (sizeBytes($is)==2)
$d="0";
else $d="”;
string $s= $d+$is;
sysFile -delete ("/Users/ship."+$s+".iff")
}

Author: salwanbadra

Replied: 08 November 2009 01:24 AM  




   
  Settings Choose Theme color: