How to copy files or folders to the root directory?

Every now and then i need to gather all files from subfolders, move them to the parent folder and delete the subfolders.

For example if i unpack a few Zip archives.

There is an easy way on Windows 10 (maybe earlier versions also?) to do this:

Just MP3’s
echo it is important to do a CD to the folder or it will kill your windows as CMD starts in your userfolder or system folder!
cd /d c:\myfolder\
forfiles /s /m *.mp3 /c “cmd /c move @path %CD%”

Everything Except for Directories…
echo it is important to do a CD to the folder or it will kill your windows as CMD starts in your userfolder or system folder!
cd /d c:\myfolder\
forfiles /s /m * /c “cmd /c if @isdir==FALSE move @path %CD%”

Now you can delete your subfolders.

As usual, do a backup before you play with your system and do not post this command into your console if you don’t understand what you do, and please change the actual folder in the console or it will mess up your windows!