mv(linux) command under windows

hi

can some tell me if i can move files and folder from one folders to another ?
( like linux )

mv /tmp/* /tmp2  /rf     -----> this command will move everyhing from /tmp to /tmp2


i am looking this command for windows/dos


victor


LVL 4
victorbxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sunnycoderCommented:
Hi victorbx,

there is a move command on windows
move /?

but I doubt it supports wildcards ... anyway you can download cygwin and get linux functionality on windows machine

Cheers!
Sunny:o)
0
victorbxAuthor Commented:
well i need the regular way ,

i need it for a corporate windows server to perform some task
on a file server


victor
0
graemeboroCommented:
Is this an automated task or some-thing you are doing yourself?  You can use the standard MS-DOS commands in Windows 2k within a script or manually.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

sunnycoderCommented:
move c:\windows\temp\*.* c:\temp - This would move the files of c:\windows\temp to the temp directory in root, this is of course assuming you have the windows\temp directory.

http://www.computerhope.com/movehlp.htm#04
0
victorbxAuthor Commented:
well ,
this is an automated task with the scheduler...

" move c:\windows\temp\*.* c:\temp " ----> will not move folders as well

i need to move every thing

                                                  EXTRA 500 FOR THE ONE WHO WILL FIND A SOLUTION


VICTOR
0
_nn_Commented:
XXCopy can do that (see /RC option) : http://www.xxcopy.com
0
victorbxAuthor Commented:
i need the standard windows commands

builded batch files will be accepted as well

victor
0
sunnycoderCommented:
xcopy source destination /E

This will copy everything "inside" source to destinations

rd /s source

will delete all file in source and its subdirectories


xcopy source destination /E
rd /s source

should do it for you
0
victorbxAuthor Commented:
i don't want to remove the directory ...
i want to delete everything in the directory including subfolder
and RD does not support wildcards


victor
0
sunnycoderCommented:
mv in linux does exactly that ... removes old one and creates new one
once you have copied everything to a new destination, removing old one will have same effect as mv
rd /s will remove all sub directories so it has same effect as *

if you want linux shell kind of regex, then you will have to use some external package because windows does not support them
0
_nn_Commented:
Just trying to improve sunny's suggestion : in a batch file

xcopy source destination /E
del /f /s /q source\*
for /f "delims=" %%a in ('dir /b source\*') do rd /s /q "source\%%a"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
suredazzleCommented:
You can ......mv *.*  /dir

or

mv *.* ../dir

It works!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.