Skip to content

File Operations

This page covers what each file operation in the file browser does on the server, and how the transfer queue handles uploads and downloads.

  • From the browser. Choose Upload in the action menu and pick one or more files. They are uploaded into the folder you are viewing.
  • Drag and drop (desktop). Drop files from your file manager onto the browser to upload them into the current folder. Folders in the drop are skipped.
  • From another app (iOS and Android). Share files to PocketCmd from any app’s share sheet. Send files to server lets you pick a server and a destination folder (the home folder by default, recent destinations or Browse folders) and queues the uploads.

Servers locked by the Free limit are listed grayed out in Send files to server and cannot be picked; tapping one explains the lock.

Download in a file’s menu asks where the file should go:

Choice Result
App storage Saved in PocketCmd’s documents folder. On iOS this folder appears in the Files app under On My iPhone › PocketCmd (or On My iPad).
Save as… You pick a folder and name first; the file is moved there when the download finishes.
Share when done The share sheet opens when the download finishes.

An existing local file is never overwritten. If the name is taken, the download gets a unique name. Selecting several items and choosing Download downloads the selected files; folders in the selection are skipped. Completed downloads can be opened or shared again from the transfer queue with Open / share.

  • New folder in the action menu creates a folder in the current directory.
  • Rename changes the name of a file or folder in place.
  • Create Symlink creates a symbolic link to the selected file in the current folder. The Link name defaults to the file name plus .link.

Copy and Move open a folder picker (Copy to, Move to) for the destination. Both work on single items and on a multi-selection.

  • Copy runs cp -a on the server, so data does not pass through your device and permissions and timestamps are kept. On a server without command execution (an SFTP-only account), PocketCmd copies the file over SFTP in 4 MB windows instead.
  • Move is an SFTP rename. It fails if the destination is on a different file system, in which case copy and then delete.
  • Drag to move. Press and hold a file, then drag it onto a folder, or onto .. to move it up one level.

These run tar, zip, unzip, gunzip, bzip2 or xz on the server. A progress dialog with Cancel stays up while they run.

  • Compress (multi-selection toolbar) asks for an Archive name, archive.tar.gz by default. Name the archive .tar.bz2 or .tar.xz for those formats; any other name produces a gzip-compressed tar. Servers without tar get a zip archive. If neither tool exists, PocketCmd reports “No compression tool (tar/zip) found on server”.
  • Extract (file menu, archives only) unpacks .tar.gz, .tgz, .tar.bz2, .tar.xz, and .zip archives into the folder that contains them, and decompresses single .gz, .bz2, and .xz files next to the original.

Delete asks for confirmation. Deleting a folder deletes everything inside it; the prompt says how many items it contains at the top level. A symbolic link is removed as a link: the folder or file it points to is left alone. There is no trash on the server, so a deleted file is gone.

Permissions shows the owner and group IDs and a grid of Read, Write and Exec for Owner, Group and Other, with the octal mode (for example 755) updating as you change it. Apply sets the mode over SFTP.

Uploads and downloads run in a background queue. Open it with Transfers in the action menu or the transfers button at the top of the browser, which shows a badge while transfers are active.

  • Concurrency. Up to three transfers run at once per server and eight in total. Data moves in 256 KB chunks.
  • Persistence. The queue is stored on the device. It survives navigation, closing the browser and app restarts.
  • Controls. Pause, Resume, Cancel and Retry per transfer; Retry failed, Clear completed and Cancel all for the list. Multi-file uploads and downloads are grouped as a batch with combined progress.
  • Progress. Each transfer shows its percentage and an ETA.

Neither side ever sees a half-written file. An upload is written to a temporary file next to the destination (<name>.pocketcmd-<id>.part) and renamed into place once its size checks out. A download is written to a .partial file on the device and renamed when complete.

A transfer that hits a network error is retried automatically after 2, 4 and 8 seconds, then paused. Paused transfers start again when the connection comes back. On Android a foreground service keeps transfers running while the app is in the background; it can be turned off under Settings › Connection › Keep Alive Service › SFTP transfers. On iOS, transfers run for as long as the system allows in the background and then pause with their progress saved.

Before resuming, PocketCmd checks that the source file has not changed: its size, modification time and checksums of its first and last 256 KB must match, and the part already transferred must match the source. If anything differs, the transfer restarts from zero instead of producing a corrupted file.

A transfer to a server locked by the Free limit pauses and keeps its progress. It continues once the server is active again, either because you upgraded or because you chose it as your active server.

When an uploaded file already exists on the server, PocketCmd shows both versions (EXISTING and INCOMING) with size, modification time and permissions, and asks what to do:

  • Overwrite replaces the server’s file.
  • Skip leaves it and marks the transfer done.
  • Rename uploads under a new name you enter (Use name).
  • Cancel batch stops the remaining transfers in the batch.

Compare opens both files as a line diff, the server’s copy (EXISTING) against yours (INCOMING). Closing the diff returns to the dialog. Files over 2 MB ask before they load (Load anyway), and binary files or files over 16 MB can’t be compared.

In a batch, a checkbox applies the same answer to every remaining conflict.

When the server refuses an operation, the message explains the SFTP status code and keeps the number, for example “… (SFTP error 2)”. The common ones:

Code Meaning Usual cause
2 No such file The file or folder was moved, renamed or deleted.
3 Permission denied Your account on the server may not read or change this path.
4 Failure The server gave no reason. OpenSSH’s SFTP server uses this code for an existing name, a folder that is not empty, or a full disk.
6, 7 Connection lost The SSH connection dropped. Reconnect and retry.
8 Unsupported The server does not support the operation.