May 5, 2011

Sathishkumar Sathishkumar
Lab Rat
12 posts

Copying,  removing dirs

 

Hi all,

Here, I have to copy a directory to another location and the removing the original directory. I found some links in http://stackoverflow.com/questions/2536524/copy-directory-using-qt that gives good explanations.

I believe this task is very trivial task one have to do in GUI applications. So, why this function is not added as part of Qt Library or Is there any LGPL code for doing this, so one can readily use that code.

 Signature 

Regards
Sathishkumar D
flowersopenlab.weebly.com

4 replies

May 5, 2011

ngrosjean ngrosjean
Lab Rat
35 posts

Perhaps I don’t catch you, but why not using QDir::rename ?

Sorry, I think you need something more complicated. Did you have only regular files on your directory?

May 5, 2011

Sathishkumar Sathishkumar
Lab Rat
12 posts

Yes I have only regular files only. I want to copy from system to USB Mass storage device. And then delete the things in system.

 Signature 

Regards
Sathishkumar D
flowersopenlab.weebly.com

May 5, 2011

ngrosjean ngrosjean
Lab Rat
35 posts

It’s a perhaps a workaround, but why not using

  1. QProcess::startDetached(...)

… and invoke a command line to simply move your directory?

May 5, 2011

Sathishkumar Sathishkumar
Lab Rat
12 posts

Yes thats simple.

Anyway for cross-platform development we need use code right.

 Signature 

Regards
Sathishkumar D
flowersopenlab.weebly.com

 
  ‹‹ using BOA/CGI to pass parameter to Apps via QSetting?      Lost keyboard control when qt application starts on non-X11 system ››

You must log in to post a reply. Not a member yet? Register here!