Creating a Batch File to Copy Files in a Local Drive

preview_player
Показать описание


Example:

Copy a whole directory with all the contents in it.

xcopy /s /e "drive:\filepath source directory" "drive:\filepath target directory"

Example:
xcopy /s /e "Files1\Part1" "c:\server files\location1"

References

Batch Programming Inputs and Outputs

Creating a Batch File to send files from a Local Drive to a Network Drive

Creating a Batch File to Create Directories and Remove Directories

Batch Programming Simple Menu

How to Create a Basic FTP Batch File

FTP Console Commands How to Send and Retrieve Files

FTP Command Prompt Connecting and Downloading Files

Run a Batch File in Administrative Mode with Task Scheduler

Create a Batch File for Ipconfig

Basic Batch Commands Reference Guide

Creating a Batch File to Remove Directories and Subdirectories

Batch file to Open Applications

Creating a Batch File to Copy All Subdirectories onto Another Folder

Creating a Batch File to Open Folders on Windows Desktop

Creating a Batch File to Delete Folders and Remove Directories

Creating a Batch File to send files from a Local Drive to a Network Drive

Creating a Batch File to Copy Files in a Local Drive

Open Websites and Folders with Batch file

Batch Programming Mathematical Functions

Batch Programming Menu with If statements

Рекомендации по теме
Комментарии
Автор

thank you, my problem was that if there are spaces in file location you need to put " before and after it. (description helped me)
i wanted to create something that will copy/delete mods from my game (gta5 mods work only in single, and if i want to play online i have to delete them)

wojtekpolska
Автор

Many thanks :)

This is exactly what I needed, except I wish to overwrite the older versions of files previously done with xcopy.
I have tried /q command, but still asks for Y/N confirmation? If you have an answer, I would appreciate it, but
will keep researching for the answer.

Thanks again :)

EDIT: 10 second search found it on another one of your videos. Needed a /y as the last bit of code :)

NinjaKittyBonks
Автор

I have 2 images that I need to copy to 10 different folders. For example, Image A.jpg would be copied to folder 1, folder 2, folder 3, folder 4, folder 5 and folder 6. Image B.jpg would get copied to folder 7, folder 8, folder 9, folder 10, folder 11 and folder 12. Is there a way to make a batch file that could do this with drag-and-drop? Could I drop both files onto a batch file and have it perform this task? Or what I need to make some type of simple app to do this?

johnny
Автор

What if I want to move or copy files to variable partition like some devices don't have D: but have E: or whatever

kamalhashem
Автор

Hey I'm needing elevated privilege with command to copy a folder with all the content and sub directories from the downloads folder on any windows computer to the C:\ root directory. Is there a video for that or do you mind providing me the commands because I really don't know how to make it.

Howeitworks
Автор

How to copy paste the latest file from source to destination ? Since in this video it pasting all files, but l need latest file from the folder. Please help me on this

NaveenKumar-jkgy
Автор

Wow ! excellent. i just searching for it on the google. Thank you for sharing your knowledge. please .... how to copy from any location to the system drive ? without writing copying files from where, but it will copy without administrator.... Thank You.

dripoboxcloud
Автор

For individual files

xcopy Bad Company 2"

prakashroy