batch-file File Handling in batch files How to Copy Files in Batch

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

You may want to copy files from one place to another. In this example we'll teach you.

You can use the command xcopy. The syntax is xcopy c:\From C:\To

Example:

@echo off
xcopy C:\Folder\text.txt C:\User\Username\Desktop

There are also switches you can use. If you want to view them open up command prompt by Start Menu -> Accessories -> Command Prompt and then type xcopy /?



Got any batch-file Question?