From wiki.ginstr.com
Jump to: navigation, search
(Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large"><code>gn:act_renameMediaFile</code></span> Category:Action_Library...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
[[Category:Action_Library]]
 
[[Category:Action_Library]]
  
;Description: Action is used to rename media files stored in [[target]]
+
;Description: Action is used to rename media files stored in [[target]]. In case new file name contains special characters (<code>\\</code><code>/</code><code>:</code><code>*</code><code>\</code><code><</code><code>></code>.<code>|</code>), they will be replaced with <code>-</code>
 
;Action returns: void
 
;Action returns: void
 
==Action signatures==
 
==Action signatures==
Line 9: Line 9:
 
===Rename media file===
 
===Rename media file===
  
;<code>[gn:act_renameMediaFile]|[target,source]</code>
+
:;<code>[gn:act_renameMediaFile]|[target,source]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
| [[target]] target on which media file rename will be preformed
+
| [[target]] on which media file rename will be performed
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
:*[[Datatypes#photo|photo]]
+
:*<code>[[Datatypes#photo|photo]]</code>
 
|-
 
|-
| [[source|sourcePattern]]
+
| <code>[[source]]</code>
| [[source|sourcePattern]] source of new file name
+
| [[source]] of new file name
* Valid [[source|source]]:
+
* Valid [[source]]:
:*[[Datatypes#text|text]]
+
:*<code>[[Datatypes#text|text]]</code>
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
<code>@variable/Photo</code> - target<br>
+
:<code>@variable/Photo</code> - target<br>
<code>@string/newPhotoName</code> - name source<br>
+
:<code>@string/newPhotoName</code> - name source<br>
<code>[gn:act_renameMediaFile]|[@variable/Photo,@string/newPhotoName]</code>
+
:; ⤷ <code>[gn:act_renameMediaFile]|[@variable/Photo,@string/newPhotoName]</code>
 
<hr>
 
<hr>

Latest revision as of 10:46, 22 September 2020

gn:act_renameMediaFile

Description
Action is used to rename media files stored in target. In case new file name contains special characters (\\/:*\<>.|), they will be replaced with -
Action returns
void

Action signatures

Rename media file

[gn:act_renameMediaFile]|[target,source]
Parameter Description
target target on which media file rename will be performed
source source of new file name

Example

@variable/Photo - target
@string/newPhotoName - name source
[gn:act_renameMediaFile]|[@variable/Photo,@string/newPhotoName]