Can a PC batch file be copied

PC Stuff Blog

Copying via the command prompt or with a batch file can have several advantages. A small and simple backup program can be written using a batch file. This batch file can also be started via the task planning (tutorial on task planning follows). Some copy protection functions can also be bypassed with it.


To copy a file, the command is sufficient:



This can also be controlled via the right-click context menu. So now we come to the additional attributes.


For example, if you only want to initiate a copy process from a batch file after the user has given a confirmation, you can do this using the command/ W set up.


If you do not want the copying process to be aborted if errors occur, you must use the attribute/ Cuse.


/G allows you to copy encrypted files to a destination that does not support encryption.


With the parameter/H copies the batch file, including files that are hidden. Or have the attribute system.


If you do not always want to confirm when a file is to be overwritten during a copy process, use the parameter/ Y. You can do exactly the opposite through/ -Y.

/ D: M-T-J causes only files to be copied that were changed on or after the date.

If no date is specified, only files that are newer than the existing target files are copied.

This post was posted in Programming by Blogger on. Keywords: batch, batch copy files.