#11 2007-01-15 14:09

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: Parse Date/Time from Filename -> File Created/Modified...

Yep, try the latest development version: ReNamerBeta.zip.

And replace the line
dateText := Copy(FileReadLine(FilePath, 1), 325, 20);
    with
dateText := FileReadFragment(FilePath, 325, 20);

Tell me how it goes, ok?

P.S. read the previous post on the previous page!

Offline

#12 2007-01-15 18:16

smw
Member
Registered: 2007-01-15
Posts: 3

Re: Parse Date/Time from Filename -> File Created/Modified...

Simply awesome!  Worked great, thank you.  I know I played around with FilePath in there instead of FileName at one point, but I was probably also changing something else at the same time so that it still didn't work.

Alright, one more question for you then.  I don't have any need for this at the moment, but I am curious to know if it can be done.  For my avi files, the date/time is always located at the same position.  What if it were not always in the same place?  Is there a way to search for a Regular Expression within the text and pull it out to a string in order to manipulate it?  I see there is a function called SearchReplaceRegEx, so I assume it would work similarly, except within the text itself with the output to a string.  Again, just for curiousity (in case friends want to do something similar, or in case I am ever trying to do something unrelated to renaming even).

You have the best support I've ever seen for a program...truly impressed.

Offline

#13 2007-01-15 23:58

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: Parse Date/Time from Filename -> File Created/Modified...

Yes, there is a way to search for patterns within text using Regular Expressions. In fact, soon I will add another RegEx function to extract all matches of the specified pattern into an array. BUT don't forget that RegEx operations are very CPU intensive, and finding patterns within AVI files might not be a very good idea, since AVI files tend to be very large in size.

Anyway, it is still possible! smile

Offline

Board footer

Powered by FluxBB