Making a task list for Format Factory?

  1. Posts : 161
    Windows 10

    Making a task list for Format Factory?

    There's a program called Format Factory which is the fastest multimedia format converter there is. The latest version is even better because it now features the ability to set the number of threads used. I have it set to 9 threads running on a Ryzen 5 3600. I'm converting 9 WMA and M4A audio files simultaneously to MP3.

    While it's capable of loading up a few thousand files at once into its list, getting them into it is the iffy bit. It crashes quite often doing that but once successfully loaded it reliably churns through them all until its done.

    It can save all the files to be processed into a task list, which is simply a plain text file with the extension .task The task file is formatted like this

    "-> MP3" "High quality" "L:/Music/ALBUMS/Album1/00 song.m4a" "L:/Music/ALBUMS/Album1\00 song.mp3"

    Line after line, every file with its path on its own line. Note that the final forward slash is flipped to a backslash in the output section.

    What I want to do is get a list of all the M4A and WMA files I want to convert and put them into a text file with the formatting for a Format Factory task list. Then I should be able to load that list, click Start and come back some hours later to delete all the old files.

    I'm thinking it should be possible with a batch file in Windows 10 x64
      My Computer

  2. Try3's Avatar
    Posts : 9,140
    Windows 10 Home x64 Version 21H2 Build 19044.1237

    Galane said:
    What I want to do is get a list of all the M4A and WMA files I want to convert ...
    You have not said how you are going to decide what goes into the list.

    I think you should also check your slashes because Windows file paths are normally expressed as
    "L:\Music\ALBUMS\Album1\00 song.m4a"
    "L:/Music/ALBUMS/Album1/00 song.m4a"
    as you can see by dragging any file into an open cmd window.

    You are correct that a batch file is one method that could be used to do the job. It would almost certainly use the For command and would also involve manipulating variables.
    For - SS64
    Standard passable variables [post #47] - TenForums
    Manipulating variables in batch files [post #14] - TenForums

    Last edited by Try3; 23 Jun 2021 at 20:06.
      My Computer

  3. Posts : 161
    Windows 10
    Thread Starter

    The format of the slashes is correct for Format Factory's task list. That is how it is put into the *.task file by the software so that is how it must be.

    If I can just get a text file with a list of files with the full path to every file, one per line, I might be able to use Excel to fix up the rest.
      My Computer

  4. Try3's Avatar
    Posts : 9,140
    Windows 10 Home x64 Version 21H2 Build 19044.1237

    Yes, Excel is also one of the ways you can construct the list.
    - Using Excel is best suited to a one-off job.
    - Using a batch file is best suited to a job that will have to be repeated several times.

    Select all the files you want to include then press & hold down the Shift key as you right-click & select Copy as path. You can then paste into Excel and manipulate the list to your heart's content.
    - You can also use this method to add many different groups of files or even single files to the list.

      My Computer

  5. Posts : 161
    Windows 10
    Thread Starter

    Copy as path, just what I needed. Paste into a text file, which puts each file with its full path on a separate line, with " at each end.

    Open in Notepad and do a global find replace of \ with / and save it.
    Import into Excel as a delimited text file with / as the delimiter and Text Qualifier {none}.
    Then insert columns where the forward slashes used to be. Select first cell, scroll to last cell, shift+click, F2, enter a /, ctrl+enter.
    For columns toward the right on lines where the path had fewer levels, select the column then sort A-Z and select Expand selection. That sorts the empty cells together so / can be inserted only on rows where its needed.
    Save as a CSV file.

    Change the .CSV extension to .txt and open with Notepad, then do finds and replaces to change things like """ to " and ",/, to / That will leave some double commas ,, to find and replace with nothing.
    For the destination paths for Format Factory, find and replace all ,/," with \
    *Before* doing this last change, save a copy so that ,/," can be replaced with / for the source path file to have the same sorting as the destination path file.

    The end result should be two files, one with the full paths and file names with all forward slashes, and a second file identical except the final slashes are backslashes. (Why oh why did the author of this software do this???)

    Now each of those can be imported into Excel as text files *without* deliminator, then the destination paths pasted into a column to the right of the source paths column.

    Insert a column at the leftmost and fill with "-> MP3" "High quality" or whatever Format Factory puts into a sample task list you make with a few files with the settings you want.

    Save as CSV then it's back to Notepad to clean up the excess quote marks and all the commas. Could also merge columns in Excel, as long as it can be done to preserve the quotes and spaces between the processing command, source path, and destination path.

    And with that, I have to sort out a very large number of files to make several task lists, because I doubt that Format Factory can handle them ALL in one go. Already know how I'll sort. Search for 00*.wma and go from 01*.wma to as high as it takes to get no hits. Copy paths in groups, most likely all the 00, 01, and 02, then 03-05 etc.
      My Computer

  6. Try3's Avatar
    Posts : 9,140
    Windows 10 Home x64 Version 21H2 Build 19044.1237

    I'm glad it is all working out for you.

    I was a bit surprised that you didn't do the whole thing in Excel and then just copy the final results into a text file called whatever.task but it's up to you.

    Again, it's up to you but when I have done comparable jobs I have pasted the input data [your file list(s)] into column A then done each step of the processing in columns B onwards using formulas so that they remain in place when I have finished. Then, if I ever have to do a similar job in the future, the file will give me a flying start.

    All the best,
      My Computer

  7. Try3's Avatar
    Posts : 9,140
    Windows 10 Home x64 Version 21H2 Build 19044.1237

    One handy tool for processing jobs such as this is to be able to reverse a whole string of data.
    - That would have helped with the \ / replacements since the odd one the author makes you use would then be the first \ or / in the string so a standard Find function would have identified its position within the string [and then you could have reversed it all again after you had dealt with that item].

    You can create a user defined function in the VBA Editor
    Public Function ReverseString(Text As String)
    ' This creates a function that can be used in the workbook
    ' It reverses the characters in the referenced cell    
    ReverseString = StrReverse(Text)
    End Function

    And you then use ReverseString in the workbook just as you would use, say, Sum.
    Making a task list for Format Factory?-reversestring.png

    {My original source for this code as well as the idea itself was the MSAnswers forum member Jeeped}

      My Computer

  8. Posts : 161
    Windows 10
    Thread Starter

    Format Factory saves its task lists in UTF-16LE.

    Trying to import a task list with 6,000 plus entries instantly makes Format Factory quit. I did a test with just a few lines and it worked.

    So now a process of seeing just how large of a task list it can import without going *poof*. Probably could easily handle it if it was 64bit.
      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 23:01.
Find Us

Windows 10 Forums