visual3d:documentation:pipeline:file_commands:file_rename
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:file_commands:file_rename [2024/06/17 18:19] – created sgranger | visual3d:documentation:pipeline:file_commands:file_rename [2025/07/30 14:59] (current) – wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== File Rename ====== | ||
+ | ===== Overview ===== | ||
+ | The **File_Rename** command in Visual3D is used to rename one or more existing C3D files in the workspace. This command is especially helpful when automating naming conventions for large datasets or batch-processing files across multiple subjects or trials. | ||
+ | This is equivalent to selecting **File > Rename** from the Visual3D application menu. The command provides flexible renaming options, including the ability to use Search/ | ||
- | \\ | + | ===== Pipeline Command ===== |
- | Renames the specified file(s). This can also be done manually by going to File-> | + | |
- | |< | + | The command below is as seen on the Visual3D application, |
- | \\ | + | < |
+ | File_Rename | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
- | ==== Parameters ==== | + | ===== Command |
- | * **EXISTING_FILE_NAME:** ALL_FILES can be specified here, or an individual C3D file can be selected\\ | + | The following table shows the command parameters and descriptions: |
- | | + | |**Parameter**|**Description**| |
+ | |**! / | ||
+ | |**! /NEW_FILE_NAME=**|The new name to assign. Only used when renaming | ||
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
+ | |**! / | ||
- | * **USE_SEARCH_REPLACE: | + | ===== Dialog ===== |
- | * **SEARCH_FOR: | + | The command can be edited in the text editor, or in dialog form. To edit in the dialog, either click on the Edit button in the pipeline workshop or double-click on the pipeline command. The dialog is shown below: |
- | * **REPLACE_WITH:** Specifies what text will be put in place of " | + | {{:visual3d: |
- | * **REMOVE_FILE_PATH: | + | * **Existing File(s)**: Dropdown to select a specific file or ALL_FILES. |
+ | * **New File Name**: Used to rename one file to a new fixed name. | ||
+ | * **Remove File Paths**: Options to strip the full file path from the file reference in workspace. | ||
+ | * **Rename using Search/ | ||
+ | * **Search For/Replace With**: Provide the substring to search and the new text to replace it with. | ||
+ | * **Also Rename Static Calibration Files**: Ensures associated calibration files are renamed accordingly. | ||
- | **NOTE:** Since users use similar naming conventions for C3D files, Visual3D stores the file path from where the C3D file was original loaded to differentiate between different files. Only remove the file path if you have a very good reason, and if you do, be careful when comparing between subjects, sessions, conditions, etc.\\ | + | ===== Examples ===== |
- | * **RENAME_STATIC_CALIBRATION_FILES: | + | The following example will go through the use of the **File_Rename** command in the Visual3D application. |
+ | ==== Example 1: Search/ | ||
- | ==== Example1: Search/Replace ==== | + | This example demonstrates how to rename multiple files using search/replace logic. |
- | The search/ | + | Assume you have accidentally named your RUNNING trial files with the prefix " |
- | In the following example, the C3D files have the name " | + | You want to rename these **Sub01_Run001.c3d, Sub01_Run002.c3d, etc.** |
< | < | ||
File_Rename | File_Rename | ||
- | ! / | + | / |
! / | ! / | ||
/ | / | ||
- | / | + | / |
- | / | + | / |
- | ! / | + | / |
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | This command scans all loaded files and replaces the word " | ||
+ | |||
+ | |||
+ | === Example 2: Rename File After Gait Event Detection === | ||
+ | |||
+ | This example walks through a typical workflow where a CMZ workspace is loaded, gait events are applied, and the resulting workspace in Visual3D is renamed and saved. | ||
+ | |||
+ | Step 1: Clear workspace and load file which does not have Gait Events already loaded | ||
+ | |||
+ | < | ||
+ | File_New | ||
+ | |||
+ | ; | ||
+ | |||
+ | |||
+ | File_Open | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! /SUFFIX= | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | Step 2: Apply automatic gait events and then rename the workspace file to reflect the change. | ||
+ | |||
+ | < | ||
+ | Automatic_Gait_Events | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | File_Rename | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
! / | ! / | ||
; | ; | ||
</ | </ | ||
- | \\ | + | Renames the updated file with a new name to reflect that gait events were added. |
- | [[Visual3D: | + | |
+ | ===== Notes ===== | ||
+ | * This command only renames files inside the Visual3D workspace. If you want to rename physical files on disk, that must be handled externally. | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | [[Visual3D: | ||
visual3d/documentation/pipeline/file_commands/file_rename.1718648357.txt.gz · Last modified: 2024/06/17 18:19 by sgranger