Read, organize, and edit files
List files in your selected drive, or find them by path:
flashdrive file list
flashdrive file glob '**/*.md'The result includes file IDs and paths. Use the ID for the next read or change.
Read or download a file
flashdrive file read FILE_ID --start-line 1 --line-count 40
flashdrive file get FILE_ID ./handbook.txtread opens a range of text. get downloads the original file to the local destination you name. For programs that work with a folder of files, use a mounted drive.
Create folders and move files
flashdrive folder ensure reports/2026
flashdrive folder list
flashdrive document get FILE_ID
flashdrive document move FILE_ID --to FOLDER_ID --name handbook.txt --expected-revision REVISIONReplace the IDs and revision with values from your lists and file read. Use --to root to move a file to the drive’s top level. A move or rename keeps the file’s identity.
Make a text edit
Read the file first, then use the revision and exact text you read:
flashdrive file read FILE_ID
flashdrive file edit FILE_ID --old 'Draft policy' --new 'Published policy' --revision REVISIONThe old text must occur exactly once. If the revision or text no longer matches, the edit is refused. Read the current version and reconcile it before trying again.
Delete a file
flashdrive document get FILE_ID
flashdrive document delete FILE_ID --expected-revision REVISIONConfirm the file and scope before approving the change. A revision mismatch protects a newer file from being deleted. See conflicts and recovery when a change is refused or remains unsaved.