How can such a batch program be written in BAT?

Updated on technology 2024-04-11
3 answers
  1. Anonymous users2024-02-07

    Are you copying the entire file or a specific file?

    1. Specific Documents.

    Format: Copy Source File [Target File].

    Instructions:1The source file specifies that the file you want to copy comes from ** - [drive letter 1:] [path 1] [file name 1].

    2.The target file specifies where the file is copied - [drive letter 2:] [path 2] [file name 2].

    3.If the default drive letter is the current drive letter; If the path is the current directory, it can be the default path.

    4.The source file name cannot be defaulted, and the target file name is the default name, which means that the file name will not be changed after copying.

    Examples:1Copy the A drive to the DOS directory of the C drive, and the file name remains unchanged.

    Type copy a: dos; Omit the target drive letter and file name.

    1 file(s) copied ;The screen displays the feedback message: A file has been copied.

    2.Copy the files in the C: DOS directory to the Be directory of Drive A, and the files will be renamed.

    c:\>copy \dos\ a:\

    3.Add all of the C:DOS directory. Copy the sys file to the rs directory of disk A.

    c:\dos>copy *.sys a:\rs

    2. Copy the whole disk or folder.

    Format: [drive letter] [path] xcopy [source] [target] [s][e].

    Instructions:1Drive letter and path.

    2.This command not only copies files, but also subdirectories.

    3.Parameter s: Copies all files and files in their subdirectories. If there is no s in it, the subdirectories are not copied.

    4.Parameter e: Must be used with s to copy all files and files in their subdirectories. Empty directories are also copied, and if this parameter is not included, empty directories will not be copied.

    Examples:1Copy all files in the SE directory of drive A to the SE directory of drive C.

    a:\xcopy \se\*.c:\se

    If the C drive does not have the directory SE, it will ask whether the SE is the file name or the directory name.

    Type f to indicate that SE is the file name. If you type d, SE is the directory name, and the xcopy command will automatically create the directory and complete the copy.

    2.Copy all files in the BE directory of drive A, their subdirectories (not empty directories) and files to the BE directory of drive C.

    a:\>xcopy \be\*.c:\be /s

    3.Copy all files in the BE directory of drive A, their subdirectories (including empty directories) and files to the BE directory of drive C.

    a:\>xcopy \be\*.c:\be /s/e

    You can write the command line according to your own actual situation, and then create a text document and save it as *bat, you can write multiple command lines.

  2. Anonymous users2024-02-06

    If the drive letter of the U disk is uncertain, you can only put the bat file on the U disk, such as the root directory of the U disk, assuming that the file name is:

    copy . c:\aa

  3. Anonymous users2024-02-05

    1. First of all, right-click on the desktop and select the "New - Text Document" menu option.

    2. After opening the text document page, enter the ** of the batch Wenyan royal piece errand, and then save.

    3. Next, modify the suffix of the saved text document to. bat, and then save the file.

    4. Finally, double-click the file to run the BAT batch program, and run it according to the page information prompts.

Related questions
10 answers2024-04-11

Automatically disconnect network share access with batch processing Available on: Windows 2K XP Home Pro >>>More

12 answers2024-04-11

:** automatically creates catalogs based on the date they were last modified for categorization. >>>More

8 answers2024-04-11

I haven't studied how to select this problem after finding it.,I don't know if richTextBox can be implemented.,If it's just a search, it shouldn't be difficult.。

11 answers2024-04-11

Well, it depends.

Personally, the person I love the most can't hit me, it's definitely not right to hit someone. >>>More

4 answers2024-04-11

Your second child is only four months old! Now your wife is a little bit of a sign of depression! You really should spend more time with her, the warmth of home is not just a person to pay, you work very hard, she is not idle at home with children, empathy, it is not easy! >>>More