I need a code to move a file from a list
like i choose a folder in code with many folders in and this program list all the folders and when i choose copy it'll move the file inside the selected folder and show a Done window when finished
example photo: http://img35.imageshack.us/img35/9895/cexample.png
and this is to move minecraft.jar example folder to move to:
%appdata%/.minecraft/bin/MOD/Aether
%appdata%/.minecraft/bin/MOD/zombe+toomanyitems
File to move and put in new (or old) folder:
%appdata%/.minecraft/bin/minecraft.jar
new folder will be created in %appdata%/.minecraft/bin/MOD/
I don't think you'll get a straight answer with all the needed code, but I can enumerate what you need:
1. Enumerate recursively all contents of the parent folder. This will tell you the total number of files and folders to move.
2. Start the move or copy process in a worker thread and update the UI (progress bar) every time an item is done. I would use a WM_USER + XXX user-defined window message because a UI thread already has a message pump, so notifying via a message is the logical and easiest choice.
3. You're done. I thought I was going to be more, hehe.
Since you are using Windows, check out the file management API: http://msdn.microsoft.com/en-us/library/aa364232(VS.85).aspx . Take a special note of CopyFileEx(). It allows for a callback function, helping you to monitor the copy progress of a single file. Especially useful for large files.