Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:15:13+00:00 2026-06-01T16:15:13+00:00

So i have some duplicate songs in my Itunes library (844 to be precise)

  • 0

So i have some duplicate songs in my Itunes library (844 to be precise) so i thought I would write a small program to find and destroy the duplicates. The problem I have encountered is some of the directories are not being read correctly.

For example one of album’s folder name is “Greatest Hits, Vol. 2” But is read “Greatest Hits, Vol”

Obviously the “.” is causing a problem. Does anyone know of a workaround that will allow me to read the full file path name (with periods)?

small snipit of Code

QString name;
int id;
    for (int a = 0; a < dir.entryList(QDir::Files | QDir::AllDirs | QDir::NoDotAndDotDot).length(); ++a)
        {
            name =  path() + "/" + baseName() + "/" + dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).at(a);
            subFiles.append(new CKClone(id, path() + "/" + baseName() + "/" + dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).at(a), this));

            // Updating the ID number to account for descendants.
            id = subFiles.last()->countDescendants(id);
        }

The above code is just a small snipit and obviously doesn’t do a whole bunch on its own. It simply reads in all of the files and directories recursively.

Any help will be appreciated, Thanks

Jec

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:15:14+00:00Added an answer on June 1, 2026 at 4:15 pm

    I actually tested this in PyQt and found that the problem does not occur for me. This is tested using Qt 4.8, so you may want to check if its a problem specific to your version.

    Dir structure like this:

    testing/
        a path with spaces/
        patH_with_no_spaces/
        path with version, vol. 2/
    

    Test snippet

    from PyQt4 import QtCore
    
    d = QtCore.QDir("testing")
    list(d.entryList(d.AllEntries|d.NoDotAndDotDot))
    
    # output
    [
        PyQt4.QtCore.QString(u'a path with spaces'), 
        PyQt4.QtCore.QString(u'path with version, vol. 2'), 
        PyQt4.QtCore.QString(u'patH_with_no_spaces')
    ]
    

    You might want to first try simplifying your code a bit more to see if its a bug in your code. You seem to be regenerating your list every time you loop, build a string, and append. Try saving the QStringList result of that entryList call once before your loop, and using that same object for the rest of the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tables 'players' and 'awards'. I have some duplicate player entries that
Possible Duplicate: Default textbox border-style and width I have some TextBox on my page
Possible Duplicate: Is there any working memory profiler for Python3 I have some script
I have a Windows Phone 7.5/Silverlight app. I have some code that I duplicate
Possible Duplicate: Best way to stop SQL Injection in PHP I have seen some
Possible Duplicate: Distance between geopoints I have some latitudes and longitudes and i need
Possible Duplicate: How disable Copy, Cut, Select, Select All in UITextView I have some
I have some code that returns unique elements in my dictionary, but I would
I need to quickly check to see if I have some duplicate values in
Possible Duplicate: How to best split csv strings in oracle 9i I have some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.