mv /from/dirctory/* /to/drictory
mv myfolder/* .
mv source_path/* destination_path/
here you have to put forward slash and * after source path so that it will take files inside source_path instead of the complete source directory.
The above command moves all files (unless they are hidden) in the source directory to the destination directory.
mv /path/sourcefolder/* /path/destinationfolder/
/*A bash command to move all the files in current dir to dirDest dir.
* The sign '*' stands for 'all files'
*/
mv * /dirDest
if (System.IO.Directory.Exists(sourcePath))
{
string[] files = System.IO.Directory.GetFiles(sourcePath);
// Copy the files and overwrite destination files if they already exist.
foreach (string s in files)
{
// Use static Path methods to extract only the file name from the path.
fileName = System.IO.Path.GetFileName(s);
destFile = System.IO.Path.Combine(targetPath, fileName);
System.IO.File.Copy(s, destFile, true);
}
}
else
{
Console.WriteLine("Source path does not exist!");
}