How To Rename Files And Directories

Table of contents:

How To Rename Files And Directories
How To Rename Files And Directories

Video: How To Rename Files And Directories

Video: How To Rename Files And Directories
Video: How to rename multiple files at once with different names 2024, December
Anonim

Renaming files or directories in the Microsoft Windows operating system can be performed in several ways, some of which are discussed below.

How to rename files and directories
How to rename files and directories

Instructions

Step 1

Call the main menu of the Microsoft Windows operating system by clicking the "Start" button and go to the "Run" item to initiate the procedure for renaming the selected file or directory using the "Command Line" tool.

Step 2

Enter the value cmd in the "Open" field and confirm the execution of the launch command by clicking the OK button.

Step 3

Enter value

rename drive_name: full_path_to_selected_file old_file_name new_file_name

or

ren drive_name: full_path_to_selected_file old_file_name new_file_name

into the command interpreter text box and confirm execution by pressing the softkey labeled Enter.

Step 4

Remember that this command:

- cannot be used to change the file names of different volumes;

- not intended for moving files to another directory;

- cannot be used if there is an existing file named new_file_name.

Step 5

Use the following syntax to perform a rename of all files in the current directory with the selected extension:

ren *. old_extension *. new extension

or choose syntax

ren old_directory_name new_directory_name

to perform the procedure for changing the name of the selected directory.

Step 6

Use the MoveFile function to move the selected file or directory, since changing the full file name is interpreted by the Windows OS file system as both a rename and a move:

movefile old_file_name new_file_name

and confirm the execution of the command by pressing the function key Enter.

Step 7

Modify the command syntax to move the selected file or directory to a different drive and use the existing name:

movefileex old_file_name new_file_name dwflags, where the last parameter implies setting flags

MoveFile_Copy_Allowed and MoveFile_replace_existing

and confirm the execution of the command by pressing the function key Enter.

Step 8

Use the capabilities of Visual Basic to perform the operation of renaming selected files and directories:

Change "drive_name: / old_file_name", "new_file_name"

using the My. Computer. FileSystem. RenameFile method.

Recommended: