User Tools

Site Tools


visual3d:documentation:pipeline:file_commands:file_rename

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
visual3d:documentation:pipeline:file_commands:file_rename [2024/07/17 15:45] – created sgrangervisual3d:documentation:pipeline:file_commands:file_rename [2025/07/25 15:09] (current) wikisysop
Line 1: Line 1:
 ====== File Rename ====== ====== File Rename ======
  
-\\ +===== Overview =====
-Renames the specified file(s). This can also be done manually by going to File->Rename.+
  
-|<code>\\ File_Rename\\ ! /EXISTING_FILE_NAME=ALL_FILES\\ ! /NEW_FILE_NAME=\\ ! /USE_SEARCH_REPLACE=FALSE\\ ! /SEARCH_FOR=\\ ! /REPLACE_WITH=\\ ! /REMOVE_FILE_PATH=FALSE\\ ! /RENAME_STATIC_CALIBRATION_FILES=TRUE\\ ; \\ </code>  |  {{:FileRenameDialog.png}}|+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/Replace, remove file paths, and rename associated static calibration files.
  
 +===== Pipeline Command =====
  
-=== Parameters ===+The command below is as seen on the Visual3D application, the parameters allow for manipulation of the command's options.
  
-  * **EXISTING_FILE_NAME:** ALL_FILES can be specified here, or an individual C3D file can be selected\\+<code>
  
-  * **NEW_FILE_NAME:** If renaming an individual C3D file, the new name can be specified here\\+File_Rename 
 +! /EXISTING_FILE_NAME=ALL_FILES 
 +! /NEW_FILE_NAME
 +! /USE_SEARCH_REPLACE=FALSE 
 +! /SEARCH_FOR= 
 +! /REPLACE_WITH= 
 +! /REMOVE_FILE_PATH=FALSE 
 +! /RENAME_STATIC_CALIBRATION_FILES=TRUE 
 +
 +</code>
  
-  * **USE_SEARCH_REPLACE:** Specify TRUE or FALSE to use the search/replace function. This must be used in conjunction with the SEARCH_FOR and REPLACE_WITH parameters.\\+===== Command Parameters =====
  
-  * **SEARCH_FOR:** Specifies what text will be removed. This must be used in conjunction with the REPLACE_WITH and REPLACE_WITH parameters.\\+The following table shows the command parameters and descriptions:
  
-  * **REPLACE_WITH:** Specifies what text will be put in place of "SEARCH_FOR" textThis must be used in conjunction with the SEARCH_FOR and USE_SEARCH_REPLACE parameters.\\+|**Parameter**|**Description**| 
 +|**! /EXISTING_FILE_NAME=ALL_FILES**|The file(s) to be renamedYou can specify a single file, ALL_FILES, or a wildcard.| 
 +|**! /NEW_FILE_NAME=**|The new name to assign. Only used when renaming a single file without search/replace.| 
 +|**! /USE_SEARCH_REPLACE=FALSE**|If TRUE, activates search/replace renaming logic.| 
 +|**! /SEARCH_FOR=**|The string in the filename to find when using search/replace.| 
 +|**! /REPLACE_WITH=**|The string to replace the found text with.| 
 +|**! /REMOVE_FILE_PATH=FALSE**|If TRUE, removes the file path prefix from the file name| 
 +|**! /RENAME_STATIC_CALIBRATION_FILES=**|If TRUE, will also rename any static calibration files linked to the C3D.|
  
-  * **REMOVE_FILE_PATH:** Specify TRUE or FALSE to remove file path.+===== Dialog =====
  
-**NOTE:** Since users use similar naming conventions for C3D filesVisual3D 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.\\+The command can be edited in the text editoror in dialog form. To edit in the dialog, either click on the Edit button in the pipeline workshop or double-click on the pipeline commandThe dialog is shown below:
  
-  * **RENAME_STATIC_CALIBRATION_FILES:**Specify TRUE or FALSE to also perform search/replace on the static trial.\\+{{:visual3d:documentation:pipeline:file_commands:file_rename_dlg.png?400|}}
  
 +  * **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/Replace**: Enables the lower section for text substitution.
 +  * **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.
  
-=== Example1: Search/Replace ===+===== Examples =====
  
-The search/replace function in this command can be used to rename the C3D files in the workspace.+The following example will go through the use of the **File_Rename** command in the Visual3D application.
  
-In the following example, the C3D files have the name "Sub01_Walk001.c3d" but they are renamed to "Sub01_NEW_NAME001.c3d".+==== Example 1: Search/Replace ==== 
 + 
 +This example demonstrates how to rename multiple files using search/replace logic. 
 + 
 +Assume you have files named like **Sub01_Walk001.c3d, Sub01_Walk002.c3d, etc.** You want to rename these **Sub01_NEW_NAME001.c3d, Sub01_NEW_NAME002.c3d, etc.**
  
 <code> <code>
 File_Rename File_Rename
-/EXISTING_FILE_NAME=ALL_FILES +/EXISTING_FILE_NAME=ALL_FILES 
-/NEW_FILE_NAME=+/NEW_FILE_NAME=
 /USE_SEARCH_REPLACE=TRUE /USE_SEARCH_REPLACE=TRUE
 /SEARCH_FOR=WALK /SEARCH_FOR=WALK
 /REPLACE_WITH=NEW_NAME /REPLACE_WITH=NEW_NAME
-/REMOVE_FILE_PATH=FALSE +/REMOVE_FILE_PATH=FALSE 
-/RENAME_STATIC_CALIBRATION_FILES=TRUE+/RENAME_STATIC_CALIBRATION_FILES=TRUE
 ; ;
 </code> </code>
  
-\\+This command scans all loaded files, finds any filenames containing WALK and replaces that portion with "NEW_NAME". The file paths are retained, and any related static files are renamed as well.  
 + 
 +===== 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:Documentation:Pipeline:General_Information:Pipeline_Commands_Reference|Back to Pipeline Commands Reference]] [[Visual3D:Documentation:Pipeline:General_Information:Pipeline_Commands_Reference|Back to Pipeline Commands Reference]]
  
  
  
visual3d/documentation/pipeline/file_commands/file_rename.txt · Last modified: 2025/07/25 15:09 by wikisysop