Batch file conversion
 1-6  7-26  27-46  47-48
Thread Split: Some posts in this thread were moved from here

Previous
Next
 From:  Michael Gibson
2100.47 In reply to 2100.45 
Hi naxos, this will require an update to MoI in order to get this script to work in MoI v3 - the script happened to be using a Microsoft-scripting specific mechanism for going through the files within a directory. I'll need to make a built-in method in MoI to handle that part (and the script will need modification to use the new method) since the new script engine in v3 is not able to interface directly with that previous library that the script was trying to use.

So for the next v3 beta there will be a solution for v3 but for the moment to get this script to work you will need to use MoI v2 instead.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
2100.48 In reply to 2100.45 
Hi naxos, I've added a new script method for the next v3 beta so that this will be able to work in v3.
With the next beta you'll be able to use this for the ConvertFolder() function inside the Convert.js file:
code:
    function ConvertFolder( FolderName, FileExtensionToLoad )
    {
        // Convert all files within a given folder, that have the given file extension.
        // For example, convert all .3dm files inside of the folder c:\test :
        // ConvertFolder( 'c:\\test', '3dm' );
    
        var Files = moi.filesystem.getFiles( FolderName, '*.' + FileExtensionToLoad );
   
        for ( var i = 0; i < Files.length; ++i )
            Convert( Files.item(i) );
    }

But until the next v3 beta is out you'll need to use that version you've already got but with MoI version 2 instead of MoI version 3.

Thanks for reporting the problem so I could get v3 tuned up.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-6  7-26  27-46  47-48