Showing posts with label Batch File. Show all posts
Showing posts with label Batch File. Show all posts

Wednesday, September 28, 2022

Create Script To Copy Files From One Folder To Another On Windows 10 - Batch file to copy files from one folder to another folder

The batch script, also known as batch file, actually refers to a list of several commands; whenever you double-click the file, the commands will be executed. If you want to copy files or folders from one folder to another automatically, creating a batch script is a nice choice. As for how to get the work done.
Yet, do you want to automatically move files from one folder to another? The copying and pasting process can be finished quickly by using the Windows command line.
You can create a batch file to copy data in a file from one place to another place on your computer automatically. The following steps are finished on Windows 10.

1. Open Windows search.
2. Type notepad.
3. Open the Notepad app.
4. Copy & paste the script into the new Notepad file.
5. Select File -> Save As.
6. Give it a name like copy_file.bat
7. Select All Files.
8. Click Save to finish creating the batch file.
Step four: type the following script in or copy & paste it into Notepad. This will copy source_file.txt to destination folder

@echo off
set "source=C:\Users\developer\Desktop\source_file.txt"
set "destination=C:\Users\developer\Desktop\"
xcopy /s %source% %destination% /Y
/b

Monday, June 19, 2017

VBScript: Execute Script Using Command Prompt | Execute Script Using Batch File Processing

VBScript: Execute Script Using Command Prompt | Execute Script Using Batch File Processing. It's easy to execute a VBScript file using Windows command prompt. First need to create ".vbs" file. Now create a file named "MyScript.bat" with following code and double click the bat file to execute VBScript.


@ECHO OFF
mode 200,50

cscript.exe MyScript.vbs

pause

exit;