Link to home
Start Free TrialLog in
Avatar of CalmSoul
CalmSoulFlag for United States of America

asked on

How to move all files/folder/sub folder from one place to another?

How to move all files/folder/sub folder from one place to another? resursivly
Avatar of pstrawser
pstrawser

logon as root..

mv origFolder locationFolder
to move folder and its subs: mv /pathtodir1 /pathtodir2
to copy folder and its subs: cp -r /pathtodir1 /pathtodir2
Avatar of CalmSoul

ASKER

I want to folder files/subfolder too in one shot

 mv /pathtodir1 /pathtodir2
yes that'll do it. you are basically renaming the parent directory.
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
calmsoul..   hope everything went ok man..  
If I want to move all subfolders from one folder to another then what command I need to give.
For Eg. I have a folder on c:\Test1 and in that I have many subfolders and I want to move all the subfolders to C:\Test2 but I don't want to move the Test1 folder (which is the parent folder).

Please suggest.