logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

28 Pages«<262728
Options
Go to last post Go to first unread
doggy  
#541 Posted : Wednesday, March 11, 2026 2:23:09 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,493
Belgium
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-names

and here
https://forums.vmix.com/posts/t3...ame-for-split-recordings


Code:
   
    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 



Users browsing this topic
Guest
28 Pages«<262728
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.