I have a source folder where i have xml files and non xml files. I need to copy only non xml files from source to destination folder. I have written commands as below which does xml files copy from source to destination folder. But i need to non xml files. Kindly help.
@echo on
set SRCROOT=D:\input
set DESTNAME=D:\archive
echo Creating Directories...
if not exist %DESTNAME% md %DESTNAME%
echo Copying Files...
copy /Y %SRCROOT%\*.xml %DESTNAME%
Update: I tried as below and it worked. Looping through the directory and copying all non xml files:
@echo on
set SRCROOT=D:\input
set DESTNAME=D:\archive
echo Creating Directories...
if not exist %DESTNAME% md %DESTNAME%
@echo off
for %%i in (%SRCROOT%\*.*) do if not "%%~xi" == ".xml" copy /Y %%i %DESTNAME%