[{"data":1,"prerenderedAt":872},["ShallowReactive",2],{"navigation_docs":3,"-platform-folders-and-documents":223,"-platform-folders-and-documents-surround":867},[4,30,83,128,157,182],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,13,17,21,25],{"title":10,"path":11,"stem":12},"What is FlashDrive?","\u002Fgetting-started\u002Fwhat-is-flashdrive","1.getting-started\u002F01.what-is-flashdrive",{"title":14,"path":15,"stem":16},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F02.quickstart",{"title":18,"path":19,"stem":20},"Key concepts","\u002Fgetting-started\u002Fkey-concepts","1.getting-started\u002F03.key-concepts",{"title":22,"path":23,"stem":24},"Find files","\u002Fgetting-started\u002Ffind-files","1.getting-started\u002F04.find-files",{"title":26,"path":27,"stem":28},"Common use cases","\u002Fgetting-started\u002Fuse-cases","1.getting-started\u002F05.use-cases",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Platform Guide","\u002Fplatform","2.platform",[35,39,43,47,51,55,59,63,67,71,75,79],{"title":36,"path":37,"stem":38},"Organizations and workspaces","\u002Fplatform\u002Forganizations-and-workspaces","2.platform\u002F01.organizations-and-workspaces",{"title":40,"path":41,"stem":42},"Members, invitations, and roles","\u002Fplatform\u002Fmembers-and-roles","2.platform\u002F02.members-and-roles",{"title":44,"path":45,"stem":46},"API keys and permissions","\u002Fplatform\u002Fapi-keys","2.platform\u002F03.api-keys",{"title":48,"path":49,"stem":50},"Drives and the default drive","\u002Fplatform\u002Fdrives-and-defaults","2.platform\u002F04.drives-and-defaults",{"title":52,"path":53,"stem":54},"Folders and files","\u002Fplatform\u002Ffolders-and-documents","2.platform\u002F05.folders-and-documents",{"title":56,"path":57,"stem":58},"Upload files","\u002Fplatform\u002Fuploads-and-indexing","2.platform\u002F06.uploads-and-processing",{"title":60,"path":61,"stem":62},"Usage","\u002Fplatform\u002Fusage","2.platform\u002F07.usage",{"title":64,"path":65,"stem":66},"Billing and credits","\u002Fplatform\u002Fbilling","2.platform\u002F08.billing",{"title":68,"path":69,"stem":70},"Storage and limits","\u002Fplatform\u002Fstorage-and-upgrades","2.platform\u002F09.storage-and-upgrades",{"title":72,"path":73,"stem":74},"Account settings and security","\u002Fplatform\u002Faccount-and-security","2.platform\u002F10.account-and-security",{"title":76,"path":77,"stem":78},"Redeem a promo code","\u002Fplatform\u002Fpromo-codes","2.platform\u002F11.promo-codes",{"title":80,"path":81,"stem":82},"Build tools from files","\u002Fplatform\u002Ffile-workflows","2.platform\u002F12.file-workflows",{"title":84,"path":85,"stem":86,"children":87,"page":29},"SDK Guide","\u002Fsdk","4.sdk",[88,92,96,100,104,108,112,116,120,124],{"title":89,"path":90,"stem":91},"Python installation and configuration","\u002Fsdk\u002Finstallation","4.sdk\u002F01.installation",{"title":93,"path":94,"stem":95},"Upload your first files","\u002Fsdk\u002Fupload-files","4.sdk\u002F02.upload-files",{"title":97,"path":98,"stem":99},"Upload a large collection","\u002Fsdk\u002Fbulk-imports","4.sdk\u002F03.bulk-imports",{"title":101,"path":102,"stem":103},"Find, read and edit files","\u002Fsdk\u002Ffiles","4.sdk\u002F05.files",{"title":105,"path":106,"stem":107},"Work with folders","\u002Fsdk\u002Ffolders","4.sdk\u002F06.folders",{"title":109,"path":110,"stem":111},"Manage drives and defaults","\u002Fsdk\u002Fdrives-and-defaults","4.sdk\u002F07.drives-and-defaults",{"title":113,"path":114,"stem":115},"Replace files and attach metadata","\u002Fsdk\u002Freplace-and-label","4.sdk\u002F08.replace-and-label",{"title":117,"path":118,"stem":119},"Upload recovery and partial failures","\u002Fsdk\u002Fupload-recovery","4.sdk\u002F09.upload-recovery",{"title":121,"path":122,"stem":123},"Async workflows","\u002Fsdk\u002Fasync","4.sdk\u002F10.async",{"title":125,"path":126,"stem":127},"Errors, timeouts, and retries","\u002Fsdk\u002Ferrors-and-retries","4.sdk\u002F11.errors-and-retries",{"title":129,"path":130,"stem":131,"children":132,"page":29},"CLI Guide","\u002Fcli","5.cli",[133,137,141,145,149,153],{"title":134,"path":135,"stem":136},"Get Started","\u002Fcli\u002Fquickstart","5.cli\u002F01.quickstart",{"title":138,"path":139,"stem":140},"Profiles and Access","\u002Fcli\u002Fconfiguration","5.cli\u002F02.configuration",{"title":142,"path":143,"stem":144},"Uploads and Recovery","\u002Fcli\u002Fuploads-and-recovery","5.cli\u002F03.uploads-and-recovery",{"title":146,"path":147,"stem":148},"Mount and Sync","\u002Fcli\u002Fmount-and-sync","5.cli\u002F05.mount-and-sync",{"title":150,"path":151,"stem":152},"Sandbox Tokens","\u002Fcli\u002Fsandboxes","5.cli\u002F06.sandboxes",{"title":154,"path":155,"stem":156},"Command Reference","\u002Fcli\u002Fcommands","5.cli\u002F07.commands",{"title":158,"path":159,"stem":160,"children":161,"page":29},"MCP","\u002Fmcp","6.mcp",[162,166,170,174,178],{"title":163,"path":164,"stem":165},"Connect an AI client","\u002Fmcp\u002Fconnect","6.mcp\u002F01.connect",{"title":167,"path":168,"stem":169},"Choose an assistant’s permissions","\u002Fmcp\u002Fpermissions","6.mcp\u002F02.permissions",{"title":171,"path":172,"stem":173},"Upload and manage content","\u002Fmcp\u002Fmanage-content","6.mcp\u002F04.manage-content",{"title":175,"path":176,"stem":177},"Tool reference","\u002Fmcp\u002Ftools","6.mcp\u002F05.tools",{"title":179,"path":180,"stem":181},"Troubleshooting and revoking access","\u002Fmcp\u002Ftroubleshooting","6.mcp\u002F06.troubleshooting",{"title":183,"path":184,"stem":185,"children":186,"page":29},"Reference","\u002Freference","7.reference",[187,191,195,199,203,207,211,215,219],{"title":188,"path":189,"stem":190},"Authentication and API conventions","\u002Freference\u002Fauthentication","7.reference\u002F01.authentication",{"title":192,"path":193,"stem":194},"Organizations, workspaces, and access API","\u002Freference\u002Faccess-api","7.reference\u002F02.access-api",{"title":196,"path":197,"stem":198},"Drives, folders, and files API","\u002Freference\u002Fcontent-api","7.reference\u002F03.content-api",{"title":200,"path":201,"stem":202},"Uploads API","\u002Freference\u002Fuploads-api","7.reference\u002F04.uploads-api",{"title":204,"path":205,"stem":206},"Usage and billing API","\u002Freference\u002Fusage-and-billing-api","7.reference\u002F06.usage-and-billing-api",{"title":208,"path":209,"stem":210},"Errors and recovery","\u002Freference\u002Ferrors","7.reference\u002F07.errors",{"title":212,"path":213,"stem":214},"Limits and supported files","\u002Freference\u002Flimits","7.reference\u002F08.limits",{"title":216,"path":217,"stem":218},"Troubleshooting","\u002Freference\u002Ftroubleshooting","7.reference\u002F09.troubleshooting",{"title":220,"path":221,"stem":222},"Changelog","\u002Freference\u002Fchangelog","7.reference\u002F10.changelog",{"id":224,"title":52,"body":225,"description":860,"extension":861,"links":862,"meta":863,"navigation":864,"path":53,"seo":865,"stem":54,"__hash__":866},"docs\u002F2.platform\u002F05.folders-and-documents.md",{"type":226,"value":227,"toc":849},"minimark",[228,245,252,257,284,287,291,497,507,511,545,548,627,631,656,740,768,772,782,792,796,804,821,828,832,842],[229,230,231,232,236,237,240,241,244],"p",{},"Folders in a drive work like folders on a laptop: they nest, and you can create whole trees, move and rename folders and files, and delete a folder with everything in it. A file's ",[233,234,235],"code",{},"path"," is its folder names and file name joined by ",[233,238,239],{},"\u002F",", such as ",[233,242,243],{},"policies\u002F2026\u002Frefunds.pdf",". It follows the file when you move or rename a folder above it.",[229,246,247,248,251],{},"The API and SDK call a file a document and identify it by ",[233,249,250],{},"document_id",".",[253,254,256],"h2",{"id":255},"in-the-console","In the Console",[258,259,260,269,276,281],"ol",{},[261,262,263,264,268],"li",{},"Open the drive from ",[265,266,267],"strong",{},"Drives"," or the sidebar.",[261,270,271,272,275],{},"Select ",[265,273,274],{},"New folder"," to create a folder, or open a folder first to create one inside it.",[261,277,271,278,280],{},[265,279,56],{},", or drag files onto the page. Drag a whole folder to upload it with its folder tree.",[261,282,283],{},"Browse a folder to review file names and sizes. Open a file to delete it.",[229,285,286],{},"Use the CLI, SDK, MCP or the API to move, rename or delete folders, and to move or rename files.",[253,288,290],{"id":289},"organize-with-the-cli-sdk-or-an-agent","Organize with the CLI, SDK or an agent",[292,293,294,313],"table",{},[295,296,297],"thead",{},[298,299,300,304,307,310],"tr",{},[301,302,303],"th",{},"Task",[301,305,306],{},"CLI",[301,308,309],{},"Python",[301,311,312],{},"MCP tool",[314,315,316,337,357,377,406,430,450,470],"tbody",{},[298,317,318,322,327,332],{},[319,320,321],"td",{},"Create a folder tree",[319,323,324],{},[233,325,326],{},"flashdrive folder ensure reports\u002F2026\u002Fq3",[319,328,329],{},[233,330,331],{},"client.folders.ensure([\"reports\u002F2026\u002Fq3\"])",[319,333,334],{},[233,335,336],{},"ensure_folders",[298,338,339,342,347,352],{},[319,340,341],{},"Create one folder",[319,343,344],{},[233,345,346],{},"flashdrive folder create NAME --folder PARENT_ID",[319,348,349],{},[233,350,351],{},"client.folders.create(\"q3\", parent_folder_id=...)",[319,353,354],{},[233,355,356],{},"create_folder",[298,358,359,362,367,372],{},[319,360,361],{},"Rename a folder",[319,363,364],{},[233,365,366],{},"flashdrive folder rename FOLDER_ID NEW_NAME",[319,368,369],{},[233,370,371],{},"client.folders.rename(folder_id, \"new\")",[319,373,374],{},[233,375,376],{},"rename_folder",[298,378,379,382,396,401],{},[319,380,381],{},"Move a folder (and rename it)",[319,383,384,387,388,391,392,395],{},[233,385,386],{},"flashdrive folder move FOLDER_ID --to PARENT_ID"," (",[233,389,390],{},"--to root"," for the top level, ",[233,393,394],{},"--name NEW",")",[319,397,398],{},[233,399,400],{},"client.folders.move(folder_id, parent_folder_id, name=None)",[319,402,403],{},[233,404,405],{},"move_folder",[298,407,408,411,416,425],{},[319,409,410],{},"Move or rename a file",[319,412,413],{},[233,414,415],{},"flashdrive document move DOCUMENT_ID --to FOLDER_ID --name NEW --expected-revision REV",[319,417,418,421,422],{},[233,419,420],{},"client.documents.move(document_id, folder_id, expected_revision=...)"," and ",[233,423,424],{},"client.documents.rename(document_id, \"new.txt\", expected_revision=...)",[319,426,427],{},[233,428,429],{},"move_file",[298,431,432,435,440,445],{},[319,433,434],{},"Delete a file",[319,436,437],{},[233,438,439],{},"flashdrive document delete DOCUMENT_ID --expected-revision REV --yes",[319,441,442],{},[233,443,444],{},"client.documents.delete(document_id, expected_revision=...)",[319,446,447],{},[233,448,449],{},"delete_document",[298,451,452,455,460,465],{},[319,453,454],{},"Delete an empty folder",[319,456,457],{},[233,458,459],{},"flashdrive folder delete FOLDER_ID --yes",[319,461,462],{},[233,463,464],{},"client.folders.delete(folder_id)",[319,466,467],{},[233,468,469],{},"delete_folder",[298,471,472,475,480,485],{},[319,473,474],{},"Delete a folder and everything in it",[319,476,477],{},[233,478,479],{},"flashdrive folder delete FOLDER_ID --recursive --yes",[319,481,482],{},[233,483,484],{},"client.folders.delete(folder_id, recursive=True)",[319,486,487,489,490,493,494],{},[233,488,469],{}," with ",[233,491,492],{},"recursive",", then ",[233,495,496],{},"continue_folder_deletion",[229,498,499,502,503,506],{},[233,500,501],{},"folder ensure"," reuses folders that already exist and creates the rest. ",[233,504,505],{},"flashdrive upload PATH --recursive"," also creates the folder tree of a local folder.",[253,508,510],{"id":509},"folder-rules","Folder rules",[512,513,514,517,530,539],"ul",{},[261,515,516],{},"Folders nest up to 64 levels deep, and a whole folder path is at most 1,024 bytes.",[261,518,519,520,522,523,526,527,529],{},"A folder name is 1 to 120 characters, never ",[233,521,251],{}," or ",[233,524,525],{},"..",", with no ",[233,528,239],{}," or control characters.",[261,531,532,533,535,536,529],{},"A file name is at most 255 bytes, with no ",[233,534,239],{},", ",[233,537,538],{},"\\",[261,540,541,542,544],{},"Moving or renaming a folder takes its files and subfolders with it. A file keeps its ",[233,543,250],{}," when you move or rename it.",[229,546,547],{},"A change that breaks these rules is refused with an error you can act on:",[292,549,550,563],{},[295,551,552],{},[298,553,554,557,560],{},[301,555,556],{},"Error",[301,558,559],{},"Cause",[301,561,562],{},"What to do",[314,564,565,578,591,604],{},[298,566,567,572,575],{},[319,568,569],{},[233,570,571],{},"folder_too_deep",[319,573,574],{},"The move or new folder would go past 64 levels or 1,024 bytes of path.",[319,576,577],{},"Choose a shallower destination or shorter names.",[298,579,580,585,588],{},[319,581,582],{},[233,583,584],{},"folder_cycle",[319,586,587],{},"A folder would move into itself or one of its own subfolders.",[319,589,590],{},"Choose a destination outside the folder.",[298,592,593,598,601],{},[319,594,595],{},[233,596,597],{},"duplicate_name",[319,599,600],{},"A move or rename would give a folder or file the name of another one beside it.",[319,602,603],{},"Rename it, or choose another destination.",[298,605,606,611,616],{},[319,607,608],{},[233,609,610],{},"folder_not_empty",[319,612,613,614,251],{},"You deleted a folder that still holds files or folders, without ",[233,615,492],{},[319,617,618,619,622,623,626],{},"Delete with ",[233,620,621],{},"--recursive"," (or ",[233,624,625],{},"recursive=True",") if you mean to remove everything in it.",[253,628,630],{"id":629},"change-a-file-without-overwriting-anyone","Change a file without overwriting anyone",[229,632,633,634,522,637,640,641,522,644,647,648,651,652,655],{},"Every change to an existing file names the revision it started from: ",[233,635,636],{},"--expected-revision",[233,638,639],{},"--revision"," in the CLI, ",[233,642,643],{},"expected_revision",[233,645,646],{},"revision"," in the SDK, and ",[233,649,650],{},"version"," in the MCP tools. If the file changed since you read it, the change is refused with ",[233,653,654],{},"stale_version"," and nothing is written. Read the file again, and redo the change only if it still applies.",[292,657,658,670],{},[295,659,660],{},[298,661,662,664,666,668],{},[301,663,303],{},[301,665,306],{},[301,667,309],{},[301,669,312],{},[314,671,672,692,720],{},[298,673,674,677,682,687],{},[319,675,676],{},"Replace exact text in a text file",[319,678,679],{},[233,680,681],{},"flashdrive file edit DOCUMENT_ID --old TEXT --new TEXT --revision REV",[319,683,684],{},[233,685,686],{},"client.files.edit_text(document_id, edits, revision=...)",[319,688,689],{},[233,690,691],{},"edit_text",[298,693,694,697,705,710],{},[319,695,696],{},"Write bytes at an offset, or append",[319,698,699,622,702,395],{},[233,700,701],{},"flashdrive file patch DOCUMENT_ID PART_FILE --offset N --revision REV",[233,703,704],{},"--append",[319,706,707],{},[233,708,709],{},"client.files.write_bytes(document_id, data, revision=..., offset=N)",[319,711,712,715,716,719],{},[233,713,714],{},"write_bytes",", or ",[233,717,718],{},"edit_file"," for larger edits",[298,721,722,725,730,735],{},[319,723,724],{},"Replace a whole file",[319,726,727],{},[233,728,729],{},"flashdrive upload FILE --replace DOCUMENT_ID --expected-revision REV",[319,731,732],{},[233,733,734],{},"client.documents.replace_file(document_id, path, expected_revision=...)",[319,736,737],{},[233,738,739],{},"prepare_upload",[229,741,742,743,746,747,750,751,753,754,756,757,421,760,762,763,767],{},"A text edit replaces each exact ",[233,744,745],{},"old"," text, which must occur once in the file, with its ",[233,748,749],{},"new"," text; the edits apply in order, all or nothing. ",[233,752,691],{}," works on text up to 8 MiB. One ",[233,755,714],{}," call writes up to 32,768 bytes; ",[233,758,759],{},"flashdrive file patch",[233,761,718],{}," send up to 64 MiB per request. See ",[764,765,766],"a",{"href":23},"find files"," for reading the revision.",[253,769,771],{"id":770},"conflict-copies","Conflict copies",[229,773,774,775,778,779,251],{},"A ",[764,776,777],{"href":147},"mounted drive"," or a working copy saves your edits when you are done with a file. If the drive's version changed in the meantime, nothing is overwritten: the other version is kept beside the file as a recovery copy such as ",[233,780,781],{},"name (conflict 20261114T010203Z a1b2c3d4).ext",[229,783,784,785,788,789,251],{},"To resolve one, compare the copy with the original. Merge the changes into one file, then delete the copy, or rename it if you want to keep both. To find recovery copies, use the ",[233,786,787],{},"recovery"," MCP tool or glob for ",[233,790,791],{},"'* (conflict *'",[253,793,795],{"id":794},"delete-and-restore","Delete and restore",[229,797,798,799,803],{},"A deleted file can be restored within one hour of its deletion. After that it is gone. That holds however the file was deleted: on its own, with its folder, or with up to 1,000 others in ",[764,800,802],{"href":801},"\u002Freference\u002Fcontent-api#delete-many-files","one request",". Until it is gone, a deleted file still counts towards the drive's size. Restoring a file does not recreate folders that were deleted with it, and a restored file needs a name that is free in its destination.",[229,805,806,807,522,810,813,814,522,817,820],{},"A recursive folder delete removes the folders at once and deletes their files in steps. The CLI and SDK carry on until the deletion finishes. If one stops early (after ",[233,808,809],{},"--no-wait",[233,811,812],{},"wait=False",", a timeout, or repeated failures), finish it with ",[233,815,816],{},"flashdrive folder continue-delete OPERATION_ID",[233,818,819],{},"client.folders.continue_deletion(deletion)",". Check what a folder holds before you delete it.",[229,822,823,824,251],{},"To delete a drive, see ",[764,825,827],{"href":826},"\u002Fplatform\u002Fdrives-and-defaults#delete-a-drive","delete a drive",[253,829,831],{"id":830},"stable-ids-and-labels","Stable IDs and labels",[229,833,834,835,838,839,251],{},"For repeatable imports through the SDK or API, give each file a stable ",[233,836,837],{},"external_id"," within the drive, and add small metadata labels such as source or owner. See ",[764,840,841],{"href":114},"replace files and labels",[229,843,844,845,848],{},"Refresh the Console page if a teammate or an agent has changed the drive since you opened it. See the ",[764,846,847],{"href":197},"content API"," for every route.",{"title":850,"searchDepth":851,"depth":851,"links":852},"",2,[853,854,855,856,857,858,859],{"id":255,"depth":851,"text":256},{"id":289,"depth":851,"text":290},{"id":509,"depth":851,"text":510},{"id":629,"depth":851,"text":630},{"id":770,"depth":851,"text":771},{"id":794,"depth":851,"text":795},{"id":830,"depth":851,"text":831},"Organize a drive in folders like a laptop drive, and change files safely.","md",null,{},{"title":52},{"title":52,"description":860},"qKiHsOC0czX08svSyoYJVyuIqL9qPASc5-jW1UwFbAY",[868,870],{"title":48,"path":49,"stem":50,"description":869,"children":-1},"Create drives, choose each workspace's default drive, and move or delete drives.",{"title":56,"path":57,"stem":58,"description":871,"children":-1},"Store any file in a drive, and know what happens to it after the upload.",1795366546182]