

When I press Enter, you'll see the name change occur in the Finder. This will keep the file in the same directory, and simply rename it. The command I'll use to rename the file is this: "mv Test.txt Testing.txt"
:max_bytes(150000):strip_icc()/Batch_Rename_Files_011-0b84f4b8175b448bb8787705a273ac17.jpg)
I'll move back into the Test directory by typing "cd Test/" and pressing Enter. For example, let's rename the Test.txt file to Testing.txt. You simply include the new file name in the location parameter. The mv command is also used to rename items. Again, when I press Enter, you'll see the file move over in the Finder. Which is like saying, move the file into the Test directory, and place it here. Then, the command would be "mv Test.txt Test/.". If you want to move it down a directory, back into the Test directory, we can move up into the Example1 directory by typing "cd. Remember that the "." means "up one directory" and the "." means the current directory, so we're basically saying "Go up into the Example1 directory and place the file here." When I press Enter, you'll see the file move over in the Finder. The command I'll use is this: "mv Test.txt.

Moving Filesįor example, let's move the Test.txt file up one level into the "Example1" directory. The syntax for "mv" and "cp" are the same. In the next video we'll copy and delete files. In this video, we'll move and rename files. The commands to move, copy and delete files and folders in the command line, are actually pretty easy to remember. Moving and Renaming Files in the Command Line
