Creating a Batch File to send files from a Local Drive to a Network Drive
Writing a small program to send files by a click saves times. It automates a repetitive process which you must do everyday. Most people these days work using their computers. We have to make backups of the files that were working on everyday. We can backup the files to different directories on different hard drives on our computers, or we can send it to other computers in the network. In this case, this batch file is used to send files to a directory on another computer.
Process
1. Map out a network drive.
2. Open up Notepad
3. Find the directory of the source and destination drives.
4. Write code into notepad
Echo
xcopy C:\File \\CompinNetwork\\File Folder /Switch(Switch is optional)
5. Save the notepad file to a .bat file.
Copy Command
xcopy /s /e "drive:\Filesource" "drive:\Filetarget" /y
(This will copy all files and directories to the directory you want)
Example.
xcopy /s /e "c:\file1" "d:\file2" /y
Send a single file or specific file
xcopy "drive:\file1\filename.pdf" "drive:\file2"
Example:
xcopy "c:\file1\document.pdf" "c:\file2\sub1"
(This code sends a document.pdf file which is in directory c:\file1 to a directory with a subdirectory c:\file2\sub1)
Reference Videos
Making a Batch file to copy files in a Local Drive
https://www.youtube.com/watch?v=4EOfxhAJNi0&t=13s
Creating a Batch file to Create and Remove Directories
https://www.youtube.com/watch?v=uUoSrVAJmfo
References
Batch Programming Inputs and Outputs
https://www.youtube.com/watch?v=ycpBqJRe16M
How to Create a Basic FTP Batch File
https://www.youtube.com/watch?v=fRzdUv-d-MM
FTP Console Commands How to Send and Retrieve Files
https://www.youtube.com/watch?v=eQFP5u_t52Q
FTP Command Prompt Connecting and Downloading Files
https://www.youtube.com/watch?v=kTMJssY-nss
Run a Batch File in Administrative Mode with Task Scheduler
https://www.youtube.com/watch?v=k2mqFNUeKd4
Create a Batch File for Ipconfig
https://www.youtube.com/watch?v=xh2Hi01ByQM
Basic Batch Commands Reference Guide
https://www.youtube.com/watch?v=ru7btFh32o8
Creating a Batch File to Remove Directories and Subdirectories
https://www.youtube.com/watch?v=Y52C3ntnb5c
Batch file to Open Applications
https://www.youtube.com/watch?v=uV3bDx5iIPM
Creating a Batch File to Copy All Subdirectories onto Another Folder
https://www.youtube.com/watch?v=rVZ0c-E5GW8
Creating a Batch File to Open Folders on Windows Desktop
https://www.youtube.com/watch?v=kOly0Ws16zU
Creating a Batch File to Delete Folders and Remove Directories
https://www.youtube.com/watch?v=KVjUJrpSQso
Creating a Batch File to send files from a Local Drive to a Network Drive
https://www.youtube.com/watch?v=64wmejdjfXA
Creating a Batch File to Copy Files in a Local Drive
https://www.youtube.com/watch?v=4EOfxhAJNi0
Open Websites and Folders with Batch file
https://www.youtube.com/watch?v=YS2bgZUSSw4
Batch Programming Simple Menu
https://www.youtube.com/watch?v=wl3cjT2JqYk
I have a website which contains the links to all my batch programming videos.
https://he-1000-1975.com/video-directory/#F