How can I change name of avi to date taken?

Asked By 30 points N/A Posted on -
qa-featured

Hi to everyone,

How can I change name of avi to date taken? A function that will enable the user to access and rename an .avi file extension on the date it was taken. I got some videos with corresponding date’s taken in a folder. I want them to rename one by one, how will I do that?

 

Thank you.

 

SHARE
Answered By 10 points N/A #165186

How can I change name of avi to date taken?

qa-featured

 

Hi,
This is very easy. You can create this function by using the build in functions to get the created date and renaming the file.
Here is the piece of code in c# you can use to get created date.
File.GetCreationTime(@""C:TestExampleTest.txt"")
You can also use this one Folder.GetDetailsOf(177) . It will return created datetime for the file on which the folder object was created.
For File renaming 
System.IO.File.Move(""oldfilename"", ""newfilename"");
In vb, it will be like My.Computer.FileSystem.RenameFile(""C:Test1.txt"", ""Test2.txt"")
Thank you
 

Related Questions