mov

moves a file or directory instead of creating another copy

FilesVersion 1.2.3Stable
lil-terminal

Overview

mov moves a file or directory instead of creating another copy. When backup is an existing directory, mov report.txt backup places the file inside it. To choose an exact new path, use mov report.txt backup/report.txt. The destination parent directory must already exist.

Know where the file will go

Check whether the destination is an existing directory or the exact new filename. Choose mov to change location, or ren to change only the name. Use -f only for an intentional replacement.

Syntax

lil-terminal
mov <src> <dst> [-f]

Reference

mov <src> <dst>

move a file or directory to <dst>

mov <src> <dst> -f

move over an existing file, link or empty directory

Notes

If the final destination exists, mov stops. Add -f only to replace a compatible file, link or empty directory—not a non-empty directory. The old destination is staged temporarily so it can be restored if the move fails. On success, the command shows a directory listing.

Safety

Moving a directory into itself is rejected. Working and base paths tracked by lil-terminal follow the moved directory. Legacy mov <dst> moves the current directory into an existing directory; new scripts should always provide both paths explicitly.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Move a file or directory to <dst>

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install mov
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install mov -m
Exact public version

Install exactly this published version.

install mov -v 1.2.3
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade mov
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install mov -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Move a file or directory to <dst>
cd \sandbox\tmp | mov draft.txt ..\workspace\draft.txt
README.txt
current.txt
draft.txt
new.txt

original.txt
updated.txt
replace.txt
draft.txt
Move a file or directory to <dst>
mov \sandbox\tmp\new.txt \sandbox\workspace
original.txt
updated.txt
replace.txt
new.txt
Move a file or directory to <dst>
mov \sandbox\tmp\new.txt \sandbox\tmp\current.txt
Destination already exists
Move over an existing file, link or empty directory
mov \sandbox\tmp\new.txt \sandbox\tmp\current.txt -f
README.txt
current.txt
draft.txt
Move a file or directory to <dst>
mov \sandbox\tmp \sandbox\tmp\inside
Destination is inside source
Move a file or directory to <dst>
cd \sandbox\workspace | mov \sandbox\tmp
README.txt
current.txt
draft.txt
new.txt
workspace/

File used in this example: sandbox/workspace/original.txt

The example uses a file or directory from the protected /sandbox/ documentation workspace.

alpha
beta
gamma

Related documentation

Current public release

v1.2.32026-10-31

Production refinement

Current stable release of mov. moves a file or directory instead of creating another copy