mv(linux) command under windows


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


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.

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

victorbxAuthor Commented:
well i need the regular way ,

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

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.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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.
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

XXCopy can do that (see /RC option) :
victorbxAuthor Commented:
i need the standard windows commands

builded batch files will be accepted as well

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
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

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
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"

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
You can *.*  /dir


mv *.* ../dir

It works!
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.