Create Playlists by file name attribute

Hi,
Somehow I have around 5000 songs that got duplicated.
The duplicate files were named like this
<filename>1.mp3
So I would like to find just those *1.mp3 files from a playlist of duplicates that I created with one of "Doug's iTunes Scripts" called "Corral Itunes Dupes"
And the kicker is that each duplicate song has the same 'date added' date+time as the original, so although I can find duplicates, I dont know which one to delete.
Is there anyway to use the filename attribute in itunes to filter my current "Dupes" playlist in order to search for files ending in 1.mp3????
Thanks,
Bill Hart
mac mini intel   Mac OS X (10.4.6)  

OK,
I think I have found the answer to my question, but it wasn't as clean as I would have liked. Beavis gave me some ideas, but ultimately I wanted to have iTunes do the deleting for me so that the database and filesystem was in sync the entire time. Due to the magnitude of the files involved I needed a batch system, the following did the trick with one caveat.
1) First, run Doug's Scripts "Coral iTunes Dupes" http://www.dougscripts.com/itunes/scripts/ss.php?sp=corralitunesdupes
2) Next run Doug's Scripts "Sundry Info to Comments" http://www.dougscripts.com/itunes/scripts/ss.php?sp=sundryinfotocomments
This step is required. If there is a better way to do this please post it. What you want to do is attach the filename to the the commment section of each database record.
Why? Because iTunes does not allow you to create smart playlists based off that information. For me, this information was necessary because the duplicates all ended in 1. You will want to tell this script to add the filename to the comments
3) Then when you can create a smart playlist that uses the "Dupes" regular playlist and add in searching "comments" for 1.mp3 or 1.m4a or 1.m4p, however you want to filter your duplicates for deletion.
4) Now you should add the column "Commment" to this playlist . This is optional, but I like to check to make sure I have the right songs, and not a bunch of real songs that actually end in 1 (maybe Stephen Malkmus's 1% of 1, for example).
5) Now to delete files from a Smart playlist or regular playlist type option-delete. You should see the standard warning about keeping or deleting files etc. I wanted to delete the files so I choose "Delete files"
6) Optional Go back to the Library and turn on "Show Duplicate Files" from the edit menu just to check you duplicate count and make sure it is in line with what you would expect.
7) DONE!
Hope this helps someone. Really, iTunes should have a facility to filter/search the library/playlists based on filename!
Oh, and the 1 CAVEAT is that for the duplicated songs that you are keeping have the filename in the comments section. Oh well, deleting 7 GB of data was better than some strange comment info.
Regards,
Bill Hart

Similar Messages

  • How to create a unique file name within a main()?

    I am creating a file using a button inside the main() .
    Each time the button is clicked, new file should be created.
    The file names should be distinct and differ in a number that follows the name for ex. MyFile1.txt, MyFile2.txt, MyFile3.txt and so on.
    Any ideas?
    thanks

    I think you want that last line to readwhile (f.exists())  // note the absent "!"since your loop as coded will end up with a filename that does exist rather than one that does not exist. You might also tryint counter=0;
    File f=null;
    do
      f=new File("myfile" + counter++);
      while (!f.createNewFile()) // This will only create a file if it doesn't already exist.
    Caution! You can't use the counter after you create the file because the counter will already be the next number. You can use f.getName(), or if you have a psychological need to use the counter, prefix the "++" and start with -1 (or just skip 0)
    Doug

  • How to create the logical file name

    Hi All,
        I have requirement where i need to post the Inventory Management data. for this i need to execute std. program RM07MMBL which is having logical file name in the selection screen. but i have placed my input file in application server.
       Can any one tell how to create the Logical filename which refers the physical path. I also tried <b>t-code SF01 & Table - FILENAMEC</b>I and found that we need to add an entry in this table but i really dont know how we have to do since this table cannot be maintained in SM30 also..
      Help Me.
      Thanks in Advance!...
    Regards,
    Ramkumar

    Hi Ram,
    Try using FILE transaction code...
    Follow these steps to create:::
    Double click on Logical file Path Definition
    Click on New Entries,
    Give Logical file Path name as Z_LOGICAL PATH and save it
    now choose this path and double click on Assignemt of Physical path to Logical path
    double click on the OS name
    Give some description and give some Physical path name from AL11 transaction and save it
    Now Double click on Logical File Name Definition,
    Click on New Entries,
    Give some logical file name: Z_LOGICAL_FILENAME
    Physical file: test
    Data Format: BIN
    Logical Path: Z_LOGICAL PATH
    Hope this helps
    Regards,
    Phani
    Message was edited by:
            Sivapuram Phani Kumar

  • How to create an output file name dinamically

    Hello Experts,
    I have created a report which is pulling information from our databases then running it on demand in order to get a plained-text file (shedule function). My question is how to handle the file name?  can i use a kind of variable to reach the required name?. For your information i was using the placeholders but i sitll need to put something else in the name which is dinamic.
    I.E : Prod 2011-04-01-08-01-13.txt
    2011-04-01-08-01-13 = which is the DateTime stamp
    Prod = I want to change this part with a parameter which will bring the required name
    I'm using Crystal Reports XI
    Thanks in advance,
    Agustin Munoz

    Need more info, are you using Enterprise?
    Nothing in Cr that can do this. If you are writing and app then typically one would use a GUID ID or some sort of time stamp, be careful though with time stamps, you could end up with a few outputs if they are generated in the same minute of second...
    Thnak you
    Don

  • How to create a unique file name each time the form is saved?

    I've got a form with several data items. When the user saves the form, it saves it as an .xml file. So far so good. But then I want the user to be able to start over and put in a new data set. I used the reset form button and this clears out the old data. But when the user goes to save the form for the second set of data, the default name of the .xml file is the same as the last record set. How do I get LCD to create a unique data name each time the form is saved? I know that the user can enter a new name, but I do not want them to have to think that much.
    Alternatively, is there a way that a user can enter several forms of data and save all of the data in one XML file that my PDF can scroll through or that I can import into excel and keep all of the data sets separate?

    Thanks Paul for the post. It sounds like this program is simply not designed for one user to keypunch a batch of forms. It would appear to limit the program's use to users who only need to key in one record/form. While a good solution for multiple users who need to enter just one set of data, the limitation would explain why this program is not widely used.

  • How to creat the logical file name.

    Hello All,
    I want to create Logical file name in my program, So Please guide me  in this issue.
    Thanks

    Check this out
    http://help.sap.com/saphelp_45b/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    FU FILE_GET_NAME
    Text
    Assign the Physical File Name Using a Logical File Name
    Functionality
    R/3 applications run on various platforms with various file systems. This function module enables you to use platform-independent logical file names in your application programs.
    Based on definitions maintained in customizing tables for platform-independent file names, the function module converts a logical file name to the corresponding physical file name and path for the hardware platform concerned.
    For this conversion to work for different platforms, the definition of a logical file name must include a logical file path, which in turn is converted to different physical file paths, depending on the particular platform. The platform-specific file name returned by the function module is composed of the physical file path for the current platform and the physical file name associated with the logical file name. Placeholders in physical file and path names are substituted at runtime by the corresponding current values.
    Example
    logical file name: MONTHLY_SALES_FILE
    physical file name: VALUES<PARAM_1>
    logical path: SALES_DATA_PATH
    physical path (UNIX): /usr/<SYSID>/<FILENAME>
    physical path (Windows): C:\SALES\<FILENAME>
    Example 1
    Get file name for UNIX platform
    (current system: K11)
    CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
    LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
    IMPORTING
    FILE_NAME = FILE
    FILE_FORMAT = FORMAT.
    Result:
    FILE = /usr/K11/VALUES
    FORMAT = WK1
    Example 2
    Get file name for UNIX platform, passing a parameter
    (current system: K11)
    CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
    LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
    PARAMETER_1 = '_TST'
    IMPORTING
    FILE_NAME = FILE
    FILE_FORMAT = FORMAT.
    Result:
    FILE = /usr/K11/VALUES_TST
    FORMAT = WK1
    Example 3
    Get file name for WINDOWS platform, with file name extension
    CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
    LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
    WITH_FILE_EXTENSION = 'X'
    IMPORTING
    FILE_NAME = FILE
    FILE_FORMAT = FORMAT.
    Result:
    FILE = C:\SALES\VALUES.WK1
    FORMAT = WK1
    Notes
    All definitions needed for the platform-independent assignment of file names are maintained client-independently with transaction FILE. Logical file names (but not logical file paths) can also be defined specifically for the current client with transaction SF01. Transaction SF07 generates a list of current definitions.
    The following concepts are used in the platform-independent assignment of file names:
    Logical file name
    A descriptive name for a file which is associated with these values:
    physical file name
    file format
    logical file path.
    If no logical file path is specified, the function module returns the physical file name only; placeholders are substituted by current values.
    Physical file name
    The physical file name may contain placeholders.
    Logical file path
    A descriptive name for a path which is associated with these values:
    syntax groups (groups of operating systems)
    physical file paths.
    Physical file path
    The physical file path is defined for a particular syntax group. It must contain the reserved word <FILENAME> as a placeholder for the file name. It may also contain other placeholders.
    Operating system
    Presentation server and application server can run under different operating systems. The current value for the application server can be obtained from the system field SY-OPSYS, the value for the presentation server by calling function module WS_QUERY.
    Both operating systems must be defined and assigned to a syntax group.
    Syntax group
    Group of operating systems with a common syntax for file and path names (e.g. HP-UX and SINIX).
    Placeholder
    Reserved words, set in angle brackets, which can be included in physical file and path names (e.g. <DATE>, <FILENAME>). You can find information on possible reserved words in the online help (F1 help) for the fields physical file name and physical file path when maintaining platform-independent file names with transaction FILE.
    If the logical path associated with a logical file name does not specify a physical path for the current operating system (syntax group), the path stored in the profile parameter DIR_GLOBAL of the current system is used for generating a complete platform-specific file name.
    Parameters
    CLIENT
    LOGICAL_FILENAME
    OPERATING_SYSTEM
    PARAMETER_1
    PARAMETER_2
    PARAMETER_3
    USE_PRESENTATION_SERVER
    WITH_FILE_EXTENSION
    USE_BUFFER
    ELEMINATE_BLANKS
    EMERGENCY_FLAG
    FILE_FORMAT
    FILE_NAME
    Exceptions
    FILE_NOT_FOUND
    Function Group
    SFIL
    Thanks
    mahesh

  • Creating dynamical flat file name in mapping?

    Hi.
    I know about the variations on how to use an input parameter and/or sysdate to create a dynamic output file name in a mapping.
    My challenge is nearly the same, but I cannot make OWB generate the correct code.
    Problem:
    - got a one column table that holds an identifier in a string field
    - got a function that reads and returns said identifier
    - imported function into OWB
    - trying to use the function call in the Flat File Operator's Target Data File Name, e.g. fixedfilename||fn_get_id()||sysdate||'.ext
    OWB creates the code:
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||fn_get_id()||'_'||SYSDATE||'.ext',
    'w',
    32767
    However, when compiling the package code, it returns the warning:
    ORA-06550: PACKAGE BODY, line 2214, column 29: PLS-00201: identifier 'FN_GET_ID' must be declared
    which results in an error when trying to execute the mapping.
    I've tried substituting the function call in the FOPEN call:
    myId := fn_get_id();
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||myId||'_'||SYSDATE||'.ext',
    'w',
    32767
    and this works fine, the mapping creates a file with the desired filename. But obviously not a good solution rewriting the generated code all the time....
    Anyone solved something similar?
    Could I use an input parameter and the autogenerated function GET_<PARAMETER>?
    But can I set the value of an input parameter inside the very same mapping?
    Regards,
    -Haakon-

    (It always helps writing out one's problems...)
    I managed to get it working :-)
    Added an input parameter to the mapping, and gave the outgroup variable a default value by calling my imported function.
    Then concatenated the implicitly generated function (GET_PARAMETER) in the Target Data flat file name.
    I now have a target file name that changes according to a departement id stored in a parameter table.
    Regards,
    -Haakon-

  • Creating the receiver file name dynamically

    Hi Friends
    Here I have a scenario IDOC to File, I am not using any mapping or creating any repository objects. My requirement is to pass the sender IDOC to receiver in an xml file format. While posting the file at receiver file directory I suppose to post it with a file name File_IDOCnumber#.xml i.e., i need to include idocnumber in the file name. As I am not using any mapping objects I might not be able to use Dynamic configuration option, kindly suggest me with a solution.
    Am using PI7.1 version
    Regards
    Suman.

    Hi Suman,
    Depending on your backend application, you can create a XML file port in WE21 and use that in your Partner Profile configuration. You can create your own function module to generate the filename based on your requirements.
    Alternatively, if you really want to pass through PI, you can use variable substitution in your Receiver File Adapter:
    Under File Access Parameters in Target Tab:
    File Name Scheme: File_IdocNumber_%idoc%.xml
    Under Variable Substituion in Advanced Tab:
    Enable : Yes
    Variable Name: idoc
    Reference: payload:IDOCTYPE,1,IDOC,1,EDI_DC40,1,DOCNUM,1
    Regards,
    Erwin
    Edited by: Erwin de Gula on Apr 28, 2011 7:57 AM

  • Playlist:  Creating playlist using folder names (auto)

    Is there a way to auto-create playlists using existing folder names? I have about 90-100 folders that I had created over the years; manually creating playlist for each folder would be a pain. I am looking for a way to auto create these playlists while iTunes is importing my folders (or otherwise). Any advice highly appreciated.
    Jixy

    iTunes alone has no way to do that. You will need a 3rd party folder watching program.
    Check out iTunes Folder Watch: http://albumbrowser.klarita.net/itfw.html

  • Create Title from File Name

    Is there a way to automatically transfer the file name to the title of the image? Can it be done with a script in the export cations folder? If it can, does anyone have a script?

    Hi Serhat,
    Are you perhaps missing a "return" on the 4th line of your pathOfFile method?
    Cheers,
    Dimitris

  • Trying to write an Automator program to find files with same time created and change file names to matching source folder names

    I am failrly green when it comes to automator.
    I am trying to write an Automator program:
    Not sure where to post this
    trying to write an Automator program to find files and alter their names
    I have a source folder with correct named master files in it.
    eg. A0001_1234.mpeg
    time created 14:02:03
    date 07/07/2012
    Another folder where there will be copies of the master files in a different format with different names but created at the same time as a file in the source directory.
    they are created with a seperate device but they are
    A0000001.mp4
    time created 14:02:03
    date 07/07/2012
    I need it to then take the name from the source fies and apply the correct name to the matching file based on the time it was created.
    I can't seem to find actions in automator that reference time crated.
    Is this something I will be able to Do in automator?
    Any help would be great
    Thanks
    R

    Hi,
    It's impossible to do this without any script in Automator.
    Use this AppleScript script :
    set source to choose folder with prompt "Select the source folder"
    set anotherfolder to choose folder with prompt "Choose the another folder"
    tell application "Finder"
        repeat with tfile in (get files of source)
            set cDate to creation date of tfile
            set findFiles to (files of anotherfolder whose creation date is cDate)
            if findFiles is not {} then
                set tName to name of tfile
                set name of item 1 of findFiles to tName
            end if
        end repeat
    end tell

  • Automator: Create folder from suffix of filename and put file names with same suffix into folder

    I've been using a script to use automator to create a folder from the filename and put that file into it the folder just created.
    I have a bunch of files that have similar names to them, but I don't want every file to be put into its own folder, instead I want all files with the same suffix (001) to go into the same folder.  I would also like the folder name to just be named the same as the suffix (001) instead of the full file name.
    For example all of these files names that end with the same integer (001) should be dumped into the same folder named "001":
    Boston_ProRes422_1920x1080_24p_Audio_001
    Boston_ProRes422_3840x2160_24p_Audio_001
    Boston_ProRes422_3840x2160_24p_RAW_Audio_001
    Boston_ProRes422_1920x1080_24p_Audio_002
    Boston_ProRes422_1920x1080_24p_Audio_005
    Boston_ProRes422_1920x1080_24p_Audio_010
    Any help at all would be incredible!!
    Thanks!
    Here's the script I'm using right now:
    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
      set {theContainer, theName, theExtension} to (getTheNames from anItem)
      try
      set destination to (makeNewFolder for theName at theContainer)
      tell application "Finder"
      move anItem to destination
      set the end of the output to the result as alias -- success
      end tell
      on error errorMessage -- duplicate name, permissions, etc
      log errorMessage
      # handle errors if desired - just skip for now
      end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
      set theContainer to the path of the container
      set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
      set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
      set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
      return (theParent & theChild) as alias
      on error errorMessage -- no folder
      log errorMessage
      tell application "Finder" to make new folder at theParent with properties {name:theChild}
      return the result as alias
      end try
    end makeNewFolder

    Thanks Neil for the response! That script didn't work, but I did get it to work with my old script by changing "set TheName to" numbers different.  Here's my final script which creates folders named "001", "002", and so forth and dumps in the files that end in that same suffix in the matching folder.
    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
      set {theContainer, theName, theExtension} to (getTheNames from anItem)
      try
      set destination to (makeNewFolder for theName at theContainer)
      tell application "Finder"
      move anItem to destination
      set the end of the output to the result as alias -- success
      end tell
      on error errorMessage -- duplicate name, permissions, etc
      log errorMessage
      # handle errors if desired - just skip for now
      end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
      set theContainer to the path of the container
      set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
      set theName to text -5 thru -((count theExtension) + 4) of theName -- just the name part
      set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
      return (theParent & theChild) as alias
      on error errorMessage -- no folder
      log errorMessage
      tell application "Finder" to make new folder at theParent with properties {name:theChild}
      return the result as alias
      end try
    end makeNewFolder

  • How to create Same file names for source and target.

    hi
    Can any body send Procedure for below requirement.
    how to create the dynamic file names for a source and save the file with same name in the Target, because it has to identify that which sender had sent the file and the target file should be again sent back to the customer as a link.
    Please help me.
    Thanks

    Hi,
    See the below link
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - sender file name as receiver file name
    Regards
    Chilla

  • LSMW - Create Logical File Name so that the physical file name is automatic

    Hello,
    In LSMW, I do not want to create a logical file name for each project.  I would like the logical file name to automatically assign the physical file to the *.lsmw.conv of the project being executed. Is there a way of doing that?  If so, could someone share?
    Regards, Dean.

    not possible to create the logical file name to physical file name automatiically.
    because the logical file name created like  PROJECT name + SUB PROJECT name +OBJECT NAME .*.lsmw.conv
    if you change the object name the file will be change....

  • Is it possible to automatically create file names?

    If i do a set of measurements and i want to save each measurement in own file is it possible to automatically create filenames? For example XXX1.vi XXX2.vi ... XXXn.vi

    Is the n in XXXn a counter or a test number? See my attached example Create Report File from Serial Number. It creates a report file name starting with the serial number of the UUT and then appending a counter. You don't have to save the counter: the program looks for the next available filename on disk.
    Your question shows file names ending in .vi. You may not have intended it, but don't use .vi for data files: save that extension for real VIs. If each measurement has its own VI and you want to name the datafile based on the name of the calling VI, see my attached example Create Report File from Calling VI. It gets the name of the calling VI and creates a .txt file with the same name as the caller (with the new extension .txt).
    Attachments:
    Create_Report_File_from_Serial_Number.vi ‏58 KB
    Create_Report_File_from_Calling_VI.vi ‏46 KB

Maybe you are looking for

  • Settlement rule SDI in prod order

    Hi, I used strategy make to order in my client, when i create prod order the settlement rule is always MAT and want the settlement rule to be SDI to my sales order. What should i config to achieve this ? since i tried to change order type dependent p

  • Report to view commitments on a vendor

    hi Guru Please tell me if on the MM side if there exists a report to view commitments on a vendor Best Regards

  • Jakarta POI VS JEXCEL

    All I'm from Japan. My English is very poor and sorry. I want to operate Excel Spread sheet on Java program. I found out an information for excel spread sheet operation on Java program by using API's POI or JEXCEL. But I have no idea which is better.

  • IST OPERATION SUBCONTRACTED WITH REFERENCE TO ORDER

    Hello SAP Experts, i am doing operation subcontractiing. My first operation is subcontracted. So, I have assigned PP02 control key to first operation  and maintained external processing data for opration in routing. When i saved the order, for that o

  • Pagemaker 5 Printing Issue

    It has been years since I used this program. I refreshed my memory a bit and attempted to create a page. I am trying to prepare some invitations. I want to put in the basic Date, Time etc. into some purchased invitations. I created a page, the size o