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 [2025/07/25 15:09] wikisysopvisual3d:documentation:pipeline:file_commands:file_rename [2025/07/30 14:59] (current) wikisysop
Line 58: Line 58:
 This example demonstrates how to rename multiple files using search/replace logic. 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.**+Assume you have accidentally named your RUNNING trial files with the prefix "Walk": **Sub01_Walk001.c3d, Sub01_Walk002.c3d, etc.**  
 + 
 +You want to rename these **Sub01_Run001.c3d, Sub01_Run002.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=Run
 /REMOVE_FILE_PATH=FALSE /REMOVE_FILE_PATH=FALSE
 /RENAME_STATIC_CALIBRATION_FILES=TRUE /RENAME_STATIC_CALIBRATION_FILES=TRUE
Line 72: Line 74:
 </code> </code>
  
-This command scans all loaded files, finds any filenames containing WALK and replaces that portion with "NEW_NAME". The file paths are retainedand any related static files are renamed as well+This command scans all loaded files and replaces the word "Walk" with "Runin each filename. The numeric suffix (e.g.001, 002) remains unchanged. The static calibration files are renamed along with the motion files. 
 + 
 + 
 +=== 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 
 + 
 +<code> 
 +File_New 
 + 
 +
 + 
 + 
 +File_Open 
 +/FILE_NAME=Data_Files\Sub04_Workspace.cmz ! USER INPUT - Change to desired file path/name 
 +! /FILE_PATH= 
 +! /SEARCH_SUBFOLDERS=FALSE 
 +! /SUFFIX= 
 +! /SET_PROMPT=File_Open 
 +! /ON_FILE_NOT_FOUND=PROMPT 
 +! /FILE_TYPES_ON_PROMPT= 
 +
 +</code> 
 + 
 +Step 2: Apply automatic gait events and then rename the workspace file to reflect the change. 
 + 
 +<code> 
 +Automatic_Gait_Events 
 +! /FRAME_WINDOW=8 
 +! /USE_TPR=TRUE 
 +! /TPR_EVENT_INSTANCE=1 
 +
 + 
 +File_Rename 
 +/EXISTING_FILE_NAME=Data_Files\Sub04_Workspace.cmz 
 +/NEW_FILE_NAME=Sub04_Workspace_with_GaitEvents.cmz 
 +! /USE_SEARCH_REPLACE=FALSE 
 +! /SEARCH_FOR= 
 +! /REPLACE_WITH= 
 +! /REMOVE_FILE_PATH= 
 +! /RENAME_STATIC_CALIBRATION_FILES=TRUE 
 +
 +</code> 
 + 
 +Renames the updated file with a new name to reflect that gait events were added. 
  
 ===== Notes ===== ===== Notes =====
visual3d/documentation/pipeline/file_commands/file_rename.1753456182.txt.gz · Last modified: 2025/07/25 15:09 by wikisysop