Search code examples
xcopy

Use Xcopy to move files and change file extension


I am looking to move files and change their file ext. Can I move .xlsx files from one location and then change the extension to text. Here is what I have done. It moves just fine. How do I incorperate changing the extension.

xcopy  /# "\\XXX\R$\wtr\Departments\Operations\Metrics\Metrics-Production\BI 
Data Dump\*.xlsx" "X:\Data Files\Yield Summary Data"

  Thanks in Advance,

Solution

  • You could just do this:

    xcopy /Y "\\Tom\R$\wtr\Departments\Operations\Metrics\Metrics-Production\BI Data Dump\*.xlsx" "G:\Data Files\Yield Summary Data\*.txt"

    \*.txt at the end of your destination.