====== Built-in File Manager ====== Batocera features a built-in file manager that can be accessed by pressing ''[F1]'' on the keyboard on the main system list (as of right now, PC and RPi4-only). Quit the file manager with ''[Ctrl]'' + ''[Q]'', ''[Alt]'' + ''[F4]'' or click **File** -> **Close Window**. ===== Overview ===== Often overlooked but a crucial piece of software in some cases. Batocera uses the lightweight [[https://web.archive.org/web/20220416080710/https://wiki.lxde.org/en/PCManFM|PCMan file manager]]. {{:emulators:pcman_file_manager.jpg?1080|}} It's pretty utilitarian, but it gets the job done. * **Sidebar** Taking up the left side of the screen, this shows some quick access shortcuts and all the currently mounted drives. * **Address bar** Your current location path. Feel free to click here and type the direct path you need to go to. [[#symlinks|Symlinks]] use the parent path of the symlink file, not the destination's path; that's the point of symlinks! * **Current folder contents** The contents of the current folder you're in. ===== Where's all my data? ===== The default path of the file manager is ''/userdata/'', which is called "Share" in the sidebar. This is due to the fact that this is the default location shown on [[add_games_bios#from_a_different_computer_through_the_network|the network share]]. Throughout the rest of this wiki, the "Share" folder is usually referred to by its direct path of ''/userdata/'' to avoid confusion between people using the file manager and those using [[:access_the_batocera_via_ssh|SSH]]. ===== Applications (advanced standalone emulator configuration) ===== If a standalone emulator features a GUI to alter its configuration, it will be featured here. It is usually not required to alter settings from here! All the important settings can be adjusted from Batocera's menus, just press ''[SELECT]'' while in the system's game list and go to **ADVANCED SYSTEM OPTIONS**. However, some emulators/systems may not have a particular option implemented yet, whereupon the only way to configure them is from its standalone GUI here. {{:file_manager_applications.png?1080|}} ===== Trash Can ===== This is where files are banished to when you delete them using this file manager by default. {{:file_manager_delete_file.png?1080|}} {{:file_manager_real_trash_location.png?1080|}} By holding ''[Shift]'' while pressing ''[Del]'' on a file, you can instead immediately delete it. You will still be prompted to confirm, but note that it says "Do you want to **delete**" instead. {{:file_manager_perm_delete.png?1080|}} The default behavior can be changed in **Edit** -> **Preferences** by unchecking 'Move deleted files to "trash can" instead of erasing from disk'. If you're having trouble removing files from your drive, refer to the [[:troubleshooting#where_d_all_my_free_space_go|specific section about it on the troubleshooting page]]. ===== Mount external storage ===== Any external storage connected to the Batocera machine is automatically mounted and shown on the sidebar (this may take a few moments to mount). This can be used to say transfer ROMs from a USB drive storage onto your userdata partition for use with Batocera! {{:file_manager_mounted_storage.png|Mounted storage shown on the left-hand side of the window. Guess what this drive is used for!}} Click the "eject" icon next to the drive to safely remove the device from the machine. ===== Symlinks ===== Symlinks, short for symbolic links, can be used to effectively create shortcuts, but better yet, make the system believe a single folder/file exists in two different places despite it only taking up the space of the single file on the physical drive! The only caveat is that symlinks are supported only on modern(ish) file systems: you can't use symlinks if you drive is formatted in FAT32 or exFAT. You can create symlinks like so: - Navigate to the folder you wish to link to. - Highlight the folder by clicking on it once. - In the menu at the top, go to **Edit** -> **Create Link...** {{ :file_manager_create_symlink.png?1080 |}} - Navigate to where you would like to create the symlink file. Essentially, this will be where your "shortcut" is. {{ :file_manager_save_symlink_location.png?1080 |}} {{ :file_manager_symlink_created.png?1080 |}} It will have the same name as the original folder at this point, so be careful of duplicate names. - If desired, rename the symlink to whatever you want. {{ :file_manager_renamed_symlink.png?1080 |}} To check the location of the symlink, right-click it and go to its **Properties**. The destination folder will be listed as the "Target file". {{:file_manager_symlink_properties.png|}} Symlinks are incredibly powerful, and can be used to do zany stuff. But remember, all this power comes with responsibility: the more complicated you make your symlinks, the more complicated it is to maintain them and remember where they all point to and what drives they are dependent on. Batocera is not tested against the usage of symlinks, you use them at your own risk. Always make backups of your data. Deleting a symlink will not delete the original folder/file, even if the prompt might make it seem so. ==== Symlink another drive to Batocera ==== The above example showcased how to make Batocera's folders accessible from another location, but what if you wanted to do the opposite? That is, have Batocera access folders in other locations. This can even work for other drives entirely (provided they also use a file system which supports symlinks)! Using this, you could have a ''roms/'' directory in which all the systems are symlinked to folders on their own separate hard-drive! But remember the warning from above, use symlinks at your own risk, and backup your data. - In the Batocera userdata drive, rename the folder you want to replace to something different. For this example, we'll be replacing the ''library'' folder, so let's rename it to ''library-old''.\\ {{:screenshot-2023.07.10-17h02.56.png?600|}} {{:screenshot-2023.07.10-17h03.20.png?600|}} - Navigate to the secondary drive you want to have Batocera check in and create a new folder with the name of the folder you intend to replace.\\ {{:screenshot-2023.07.10-17h00.33.png?600|}} {{:screenshot-2023.07.10-17h01.35.png?600|}} - Select the newly created folder, and then go to **Edit** -> **Create Link...**\\ {{:screenshot-2023.07.10-17h03.39.png?600|}} {{:screenshot-2023.07.10-17h04.00.png?600|}} - Navigate to the original folder on Batocera's userdata partition, and click **OK**.\\ {{:screenshot-2023.07.10-17h04.40.png?600|}} - That's it! Now this folder linked to a folder on another drive will be accessed by Batocera instead of the regular one in userdata!\\ {{:screenshot-2023.07.10-17h04.54.png?600|}} {{:screenshot-2023.07.10-17h05.04.png?600|}} {{:screenshot-2023.07.10-17h05.32.png?600|}} {{:screenshot-2023.07.10-17h05.39.png?600|}}