piapia123
en

File Command Generator (cp / mv / rsync / scp)

Web

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

These four commands share almost no options, and the easiest trap is an option that simply does not exist on the one you picked: `mv` has no `-p`, `cp` has no dry run, and only rsync understands `--exclude`. This tool puts only the switches that genuinely exist onto your command, and says so when an option was dropped instead of silently ignoring it. Path handling is the other half: any path with a space is quoted individually (never wrapped as one big string, which would turn two files into a single nonexistent name), while a glob like `*.log` is left unquoted so the shell can expand it. The command is assembled in your browser. No network, and your paths are never uploaded.

Features

  • Four commands: cp, mv, rsync, scp
  • The first line is the source; each line after is a destination
  • Paths with spaces quoted one by one, never as a single wrapped string
  • Globs such as *.log left unquoted so the shell can expand them
  • rsync-only -n dry run and --exclude patterns
  • Options the chosen command does not support are called out, not dropped
  • Risk notes, such as mv overwriting being irreversible
  • Everything runs locally, with no network requests

How to use

  1. Put the source on the first line and one destination per line
  2. Pick a command and tick the options you want
  3. For a remote target, enter it as user@host:/path
  4. Copy the generated command and its option notes

FAQ

Why quote a path, and where exactly?
Because the shell splits arguments on spaces, so an unquoted `my file.txt` becomes two arguments. The fix is to quote each path that needs it, giving `cp "my file.txt" out/`. The opposite mistake is wrapping the whole run in one pair of quotes (`cp "a.txt b.txt"`), which turns them into a single filename. So this tool checks path by path and quotes only what needs it.
Why does mv not get -r when recursive is ticked?
Because `mv` is already recursive — moving a directory moves its contents, and it does not accept `-r` at all. In the same way `mv` has no `-p`: moving merely renames a directory entry, so permissions and timestamps are untouched. Both options therefore produce a note rather than a flag.
Should I use rsync or cp?
For a one-off local copy, `cp` is enough. Use `rsync` when you want an incremental sync (only changed files), need to exclude a set of files, are copying to a remote host, or want to preview with `-n`. `scp` is a simpler fallback but does not do incremental transfers or exclusions.
Why is there no dry run for cp?
Because neither `cp` nor `mv` has one, and neither does `scp`. To preview what would change, use `rsync -n` (it has the most complete option set) or point the command at a scratch directory first. When you tick dry run for a command that lacks it, this tool writes that limitation straight into the result.

Related tools