You are here:

C++/file and directory manipulation


hello david,
         i need to move a folder which contains files and subfolders , including system files ,hidden files and read only files. i want to do it in real dos mode. plz help( i restart windows 98 , press f8 and wil choose command prompt only. i want to execute the program from here)
thak in advance

zid , Thank you for your question.

It is not clear whether you want to do a manual operation or write a program to do the copying, but since this is a programming forum, I will assume the latter!

I'm also assuming that you want to do this in Win32.

The CopyFileEx copies files, including all attributes. If this does not work for you, you can get the attributes of a file using the GetFileAttributes and GetFileAttributesEx functions. Set the attribute bits to normal, copy the files, then set the correct attribute bits.

To copy a folder, create a new folder using 'CreateDirectory', copy the contained files and folders recursively.

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2016 All rights reserved.