Not to show console window when using system()
-
@Christian-Ehrlicher
Thank you. Isee.
I found how to copy directory to another directory (including all files).
https://forum.qt.io/topic/10263/solved-copy-all-files-in-folder-to-another-directory/5 -
@sierdzio looks like he wants to copy a directory.
-
@sierdzio
@Christian-EhrlicherQString src = "c:\Users\a\data\" std::string dst = "C:/Users/a/Documents/data_2023-11-15" QFile::copy( src , QString::fromStdString(dst));
//---------
[C:/Users/a/Documents/data_2023-11-15 ] is not found after that.
"src" is a directory, which has some files.
"dst" is a new directory. -
As you can see in the documentation and also from the word 'file' you can also copy files with this command. You have to write a directory copy by yourself. Use the search function as you are not the first who wants to copy a directory.
-
@Christian-Ehrlicher
Thank you. Isee.
I found how to copy directory to another directory (including all files).
https://forum.qt.io/topic/10263/solved-copy-all-files-in-folder-to-another-directory/5 -
-
@ynatynat
Be aware that the post you link to actually removes a file hierarchy! To copy you will need to write something which is called recursively for each child directory you want to copy. There may be alternative posts which are more recent than that one.