Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,493  Location: Belgium Thanks: 314 times Was thanked: 1019 time(s) in 837 post(s)
|
Here is a basic script to rename the (multicorder) video files according their actual creation time issue addressed here https://forums.vmix.com/posts/t3...recording-and-file-namesand here https://forums.vmix.com/posts/t3...ame-for-split-recordingsCode:
Try
Dim filepath as string = "d:\multicordertest\"
Dim filepathnew as string = "d:\multicordertest\renamed\"
' assuming multicorderfiles are saved as mp4 else change extention
Dim dirs As String() = Directory.GetFiles(filepath , "*.mp4")
Dim vidfile As String
For Each vidfile In dirs
Console.WriteLine(vidfile )
' get creation date of video
Dim fileCreatedDate As DateTime = File.GetCreationTime(vidfile )
' create new fileame like dd-mm-yy hh-mm-ss.mp4
Dim CreatedDate as String = fileCreatedDate .Day & "-" & fileCreatedDate .Month & "-" & fileCreatedDate .Year
Dim CreatedTime as String = fileCreatedDate .Hour & "-" & fileCreatedDate .Minute & "-" & fileCreatedDate .Second
Dim newfile as string = CreatedDate + " " + CreatedTime + ".mp4"
Console.WriteLine(filepathnew & newfile)
' rename/move file to new folder
System.IO.File.Move(vidfile, filepathnew & newfile)
Next
Catch e As Exception
Console.WriteLine("The process failed:")
End Try
|
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close