Another thing I'll mention...
Download my
MCAutoQueue application. After you install it, in the installation directory's Processors folder, you'll find a vbscript called
CopySidecar.vbs. This is a pretty old script and I haven't updated it any time recently (I do my work in C# and other languages for now). I'm honestly not even 100% sure it still works, and even if it does, I wouldn't recommend using it for anything (it is, essentially, a previous version of MCFileIngester, which is much more powerful, so use that if you want to do something like what it does).
However, it shows how to connect to MC, parse command line options, and play with files in MC and on the filesystem. It is fairly well commented and might be instructive. For example...
Function blnMCWriteTags(sourceFile)
'This procedure connects to an instance of MC and then forces it to update the tags for the given sourceFile
'For video files, this causes MC to write a JRSidecar.xml file out to disk
'Connect to MC instance (try running object first)
Dim objMC
On Error Resume Next
Set objMC = GetObject(, "MediaJukebox Application")
If Err.Number = 429 Then
On Error Goto 0
'Then, create a new object
Set objMC = CreateObject("MediaJukebox Application")
End If
'Get the File object from MC
Dim objMCFile
Set objMCFile = objMC.GetFile(sourceFile)
'Check to see if MC can access the MJFileAutomation.Filename() property (if not, the file is probably not there)
If objMCFile.Filename() = "" Then
ReportError "MC ERROR:" & VbCrLf & VbCrLf & "File record not found: " & VbCrLf & sourceFile & vbCRLF & vbCRLF & "Source file is likely not in the active MC Database.", 0, 1
End If
Or, if you happen to be interested in writing in C# instead, I have a wrapper Library that makes it super-easy to access MC via COM, and has all sorts of pre-built utility methods. It isn't done, and is kind-of constantly in flux, which is why I've never published it (and there are a bunch of "old mistakes" I'd like to fix before I do), but I'd be happy to send you a PM with a download link if you want to use it. MCAutoQueue and all of my other utilities are built on top of it, and it works quite well as-is, even if some of it is ugly.
If you're learning anyway, C# is a better language than VB, and you can get a
free copy of Visual Studio that is perfectly well suited for writing console applications from Microsoft (you want the one called Express 2013 for Windows Desktop). I'm not 100% sure if there are any limits to the express version that would make my library not work, but probably not. If the express version can use COM at all, it'll almost certainly work.
Of course, then the machine you're going to use these on will need to have the .NET runtimes installed. If you require these to work on machines were that isn't the case, or you don't want to compile them to EXEs for other reasons, then maybe you're better off either sticking with vbscript or (better) learning Perl or Python.