SAMMI Stuff

Find all the information you need to set up Deck Hopper and my extensions for your SAMMI.

Random Bunny

SAMMI Extensions

Folder Files

Get on Ko-fi
Slide 0

This extension allows you to scan a folder and manipulate files with lots of useful features.

Features

File and Folder Manipulation

  • Scan all files in a folder and filter by extension, sort alphabetically, numerically, by date modified, or size.
  • Retrieve a random file in a folder.
  • Identify the last modified file in a folder.
  • Get the size of a file.
  • Rename, move, or delete a file (moved to the trash bin for safety).
  • Create or delete a folder (moved to the trash bin for safety).

File Content Commands

  • Read the last line of a file.
  • Count lines in a file.
  • Count files in a folder.
  • Find specific strings in files.

Advanced Commands

  • Compress and uncompress a folder.
  • Get the duration of a media file (with or without FFmpeg).

Disclaimer

This extension provides optional functionality that can be utilized if you have FFmpeg installed on your system. FFmpeg is not distributed with this extension, nor is it required for the extension's primary functionality. You must download it separately from the official source: FFmpeg Essentials. Please familiarize yourself with FFmpeg's licensing terms and potential patent implications before use.


Setup

Old Version Warning

If you have the old version of this extension (Get Folder Files) installed, please completely uninstall it first by going to SAMMI Core -> Bridge -> Uninstall before installing this one. You will need to migrate all your existing buttons, as this extension has been completely overhauled.

  1. Install the extension. You can follow the Extension Install Guide.
  2. Make sure SAMMI is connected to Bridge. Bridge must be running at all times and be connected to SAMMI for Folder Files extension to work.
  3. Your basic setup is finished! The premade deck serves as an example of how to use the extension. It is recommended to create separate buttons in a different deck for custom commands to avoid overriding your buttons during future updates.

Administrator Permissions

If a command does not work as intended, try running SAMMI as administrator to avoid permission errors.


How to download and set up FFmpeg

The Get Media Length command works with both the native Windows method and FFmpeg. FFmpeg is more precise for some files, as the native Windows method rounds down to the nearest second.
If you wish to use FFmpeg for the Get Media Length command, click on the 'Set Up FFmpeg' button and follow the instructions.


Available Commands

Command Usage Reminder

These commands require a waiting period before 'Save Variable As' is populated. Use the Wait Until Variable Exists command, and remember to delete the variable you're waiting for beforehand.

Get Folder Files

Returns all files in a folder, with optional filters.

Box NameDescription
Folder PathThe path to the folder where the files are located
File ExtensionsComma-separated list of file types to return. Leave empty to allow all
Sort OrderSort results alphabetically, by last modified date, or by size
Save As Full PathSave results as full path or just filenames
Save Variable AsVariable name to save the file array

Get a Random File

Picks a random file from a folder, with optional filters.

Box NameDescription
Folder PathThe path to the folder where the files are located
File ExtensionsComma-separated list of file types to return. Leave empty to allow all
Save As Full PathSave result as full path or just filename
Save Variable AsVariable name to save the random file name

Get Last Modified File

Finds the most recently changed file in a folder, with optional filters.

Box NameDescription
Folder PathThe path to the folder where the files are located
File ExtensionsComma-separated list of file types to return. Leave empty to allow all
Save As Full PathSave result as full path or just filename
Save Variable AsVariable name to save the last modified file name

Find String in Files

Finds specific strings (words) in files within a folder.

Box NameDescription
Folder PathThe path to the folder where the files are located
File ExtensionsComma-separated list of file types to search. Leave empty to allow all
String to FindThe word or phrase you're looking for
Recursive SearchSearch within subfolders (may take longer)
Save Variable As (File)Variable name to save the resulting filename
Save Variable As (Line)Variable name to save the line number where the string was found

Get File Size

Returns the size of a file.

Box NameDescription
File PathThe path to the file
UnitReturn size in KB or MB
Save Variable AsVariable name to save the file size

Count Files in a Folder

Counts the number of files in a folder, with optional filters.

Box NameDescription
Folder PathThe path to the folder where the files are located
File ExtensionsComma-separated list of file types to count. Leave empty to count all
Save Variable AsVariable name to save the file count

Count Lines in a File

Counts the number of lines in a file.

Box NameDescription
File PathThe path to the file
Save Variable AsVariable name to save the line count

Read Line in a File

Reads a specific line or the last line in a file.

Box NameDescription
File PathThe path to the file
Line NumberThe line number to read
Read Last LineOption to read the last line
Save Variable AsVariable name to save the result

Create a Folder

Creates a new folder.

Box NameDescription
Folder PathThe path where the new folder will be created

Move a File

Moves a file to another location.

Box NameDescription
Old File PathThe current path to the file
New File PathThe new file path, including the filename and extension

Rename a File

Renames a file.

Box NameDescription
File PathThe current file path
New NameThe new name, including the file extension (e.g., .txt)

Delete a File/Folder

Moves a file or folder to the recycle bin.

Box NameDescription
File/Folder PathThe path to the file or folder to delete

Compress a File/Folder

Compresses (zips) a file or folder.

Box NameDescription
File/Folder PathThe path to the file or folder to compress
Compressed File PathThe destination path for the compressed file

Uncompress a File

Uncompresses (unzips) a file.

Box NameDescription
Compressed File PathThe path to the compressed file
Uncompressed File PathThe destination path for the uncompressed file

Get Media Length

Returns the duration of a media file. FFmpeg setup is required if "Use FFmpeg" is checked.

Box NameDescription
Media File PathThe path to the media file
UnitChoose between seconds, minutes, or hours
Use FFmpegCheck to use FFmpeg. Native method may round it down to the nearest second for some files.
Save Variable AsVariable name to save the media length

Get Help

Please see Troubleshooting for common extensions issues.

Previous
Dynamic Triggers