Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to work with files from many folders inside one folder?
Forum Updated to NodeBB v4.3 + New Features

How to work with files from many folders inside one folder?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scroverty
    wrote on last edited by
    #1

    I have several files, which spread in many folder inside a main directory.

    Now I have a list of file names, the task is I have to compare the names from the list and file's name from the main folder's folders.

    My problem is I don't know which Qt class's funtion is best to solve this with shortest code possible.

    Please lead me with some simple example!

    Any replies are really appreciated!

    Alvis Ar'Berkeley Andrew.
    Pleased to meet you!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jake007
      wrote on last edited by
      #2

      Take a look at this
      "QFile::copy()":http://doc.qt.digia.com/qt/qfile.html#copy
      One example is on stackoverflow "here":http://stackoverflow.com/questions/3227622/how-to-copy-a-image-file-in-qt

      If you want to copy from different directoriey, you'll need to use upper code with combination of QDir class and recursively search for files.
      With "this":http://qt-project.org/doc/qt-4.8/qdir.html#entryList you can get all files and directories in a specific directory.
      Note: First to returns are ussualy "." and "..", which mean current and parent directory.

      Regards,
      Jake


      Code is poetry

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved