|
|
Hi everyone
Im currently setting up a mp4 streamsever and need a script to auto-hint the mp4 files that i send to the server.
The program for hinting the files is called mp4creator. I currently have a script that hints the file, it looks like this:
Set objShell = CreateObject("WScript.Shell") objShell.Run "%COMSPEC% /k mp4creator -hint=1 test.3gp",,True objShell.Run "%COMSPEC% /k mp4creator -hint=2 test.3gp"
As you can see here the command is mp4creator -hint=1 file.3gp/mp4 and if the first hint is made it also performs the hint on channel 2.
I also have a script that i got from the repository that checks for new files in a directory:
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE " _ & "Targetinstance ISA 'CIM_DirectoryContainsFile' and " _ & "TargetInstance.GroupComponent= " _ & "'Win32_Directory.Name=""c:\\\\Scripts""'")
Do Set objLatestEvent = colMonitoredEvents.NextEvent Wscript.Echo objLatestEvent.TargetInstance.PartComponent Loop
This script just informs me on the new file.
What I would like to do now is to perform the actions:
objShell.Run "%COMSPEC% /k mp4creator -hint=1 filename.mp4",,True objShell.Run "%COMSPEC% /k mp4creator -hint=2 filename.mp4"
when a new file is created in the directory and then move it to folder c:\Movies.
Ideas anyone? I dont think its so hard but im new to the scripting thing and canfigure this out.
Thanks in advance.
Jakob
|
|
|