jmon Posted September 4, 2012 Share Posted September 4, 2012 (edited) FileSequence UDFMy job requires me everyday to work with a LOT of file sequences, mostly image file sequences. So I created this UDF. I use it to batch convert image sequences to quicktimes, resize, rename, move, backup, count total frames ...etc... I use it for image scanning, but you can use it for any files numbered. Just type in the extention you need.In this UDF, I consider a file sequence to be of more than 3 consecutive files. Example:C:FolderImageSequence_001.tga C:FolderImageSequence_002.tga C:FolderImageSequence_003.tga .... --> C:FolderImageSequence_###.tgaExample: If you scan this folder : "C:Folder", looking for extentions like "jpg tga mov", then the function may return an array like this:$array[0] = 3 $array[1] = C:FolderImageSequence_#####.tga $array[2] = C:FolderImageSequence_Converted_####.jpg $array[3] = C:FolderSubFolderquicktime movies ###.mov")You can convert the returned file sequence to format %0id or wildcard with the provided functions:C:FolderImageSequence_###.tga --> C:FolderImageSequence_%03d.tga --> C:FolderImageSequence_***.tga C:FolderImageSequence_######.tga --> C:FolderImageSequence_%06d.tga --> C:FolderImageSequence_******.tgaThis UDF is a relatively fast folder scanning UDF, scanning ~40 GB with about 100 file sequences (~5000 images) and gathering all the informations (Sequence length, Sequence Range, Dimensions, FileSize ...) takes about 6-7 seconds on my computer.Remark: parts of this UDF require IrfanView, which you can download for free on their website (www.irfanview.com). I am currently converting this part of the UDF to use the FreeImage UDF instead. The UDF also uses "Array.au3" and "GDIPlus.au3".Functions:_FileSequence_Convert (uses IrfanView) _FileSequence_Copy _FileSequence_Delete _FileSequence_Exists _FileSequence_Find (Main function) _FileSequence_FSToRegExp _FileSequence_FSToWildcard _FileSequence_GetFileName _FileSequence_GetImageDimensions _FileSequence_GetParentFolder _FileSequence_GetRange _FileSequence_GetSize _FileSequence_Move _FileSequence_Rename _FileSequence_Resize (uses IrfanView)If you see anything that could be improved, please tell me, I'd be happy to make it even faster! Comments and critics welcome! Tell me what you use it for, I am curious!File_Sequence.au3File_Sequence_ExampleSimple.au3File_Sequence_ExampleAdvanced.au3 Edited December 12, 2012 by jmon ShakibHasan 1 [center]www.jmontserrat.comFile Sequence UDF - _StringExtractPaths - _StringTrimPattern - GuiCtrlSetOnTop - CalendarUDF[/center] Link to comment Share on other sites More sharing options...
kiboost Posted December 11, 2012 Share Posted December 11, 2012 Wow ! that's exactly what I was searching for !! Also works in vfx industry and work with a lot of file sequences, and I'm writing concept of a new custom software that will require heavy sequences work. Will try your UDF, many thanks for sharing. Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
jmon Posted December 12, 2012 Author Share Posted December 12, 2012 (edited) @kiboost It's very useful with programs like Nuke and PDplayer, because they both require file numbering in format #### or regexp %0xd. In PDPlayer you can use the filesequence UDF to auto convert your sequences in Quicktime for example. I also use it to backup 3dsmax files, which I usually save incrementally. So you can create a small program that scans for 3dsmax files sequences, and then backup them to a zip file. I think this UDF can be used for so many purposes. I use it everyday. Edited December 12, 2012 by jmon [center]www.jmontserrat.comFile Sequence UDF - _StringExtractPaths - _StringTrimPattern - GuiCtrlSetOnTop - CalendarUDF[/center] Link to comment Share on other sites More sharing options...
kiboost Posted December 17, 2012 Share Posted December 17, 2012 Ahah seems we use exact same tools ! Happy to see AutoIt used in this industry, a real winner. Could be better in some aeras and faster, but so easy to develop and deploy lot of little tools here and there in our workflow. Cheers Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
kamesankamesan Posted February 25, 2022 Share Posted February 25, 2022 10 years later, I'm sure this tool have been updated in your side :) Maybe this tool have an "missing frames" or "blatted frames" detection? hmm? Joking... I'm trying to add that... with no luck now. Any idea to implement that? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now