Q:
A:
Script Content Plugin by 'Lev Freidin
Plugin allows to write your own vbs and js scripts
1.) download script_wdx to C:\Temp
http://www.totalcmd.net/plugring/script_wdx.html
Forums thread >>
viewtopic.php?t=8615
2.) Start your TC and go to C:\Temp, double click at "script_wdx_0.2.0.0.rar"
The plugin archive contains an "pluginst.inf" to automatically install this plugin.
- you will be asked if you want to install this plugin: [OK]
- install to "%Commander_Path%\Plugins\wdx\script": [OK]
- contain plugin list appears: [OK]
- Done
3.) Go to "%Commander_Path%\Plugins\wdx\script" folder
- create an new text.txt file in that folder
- copy the script from StatusQuo,
found at
http://www.ghisler.ch/board/viewtopic.php?p=146906#146906 , or below
into this text.txt file
- save (rename) this text.txt file to something with VBS extension: e.g. CurrentDate.vbs
So you have now "%Commander_Path%\Plugins\wdx\script\CurrentDate.vbs"
4.) - open "%Commander_Path%\Plugins\wdx\script\script.ini"
- add an new section
[CurrentDate]
Script=CurrentDate.vbs
LongName=0
ParseDirs=1
- and modify section
[Script]
Section=Extension
to
[Script]
Section=CurrentDate
so the plugin knows what script is to use.
Save the file "script.ini".
5.) Test:
- Select "C:\Temp\script_wdx_0.2.0.0.rar"
- press Ctrl+M
- in MRT (Multi-rename tool) click into that field where the date should be inserted into the filename: e.g. right behind [N]
- click on [ [=?]Plugin ]
- select "script" and "Result"
(or "Result1", or "Result2", or...)
You will see what happens.
Note:
In the var "content" is store what you will get by "Result", using the term "[=script.Result]"
The var "content1" you can access by "Result1", [=script.Result1]
... and so on
"content2" => [=script.Result2]
"content3" => [=script.Result3]
...
So you don't have to modify the last line in that script.
And, whit an little knowledge of VBScript you can adjust the time/date format yourself.
HTH?
----
I have rearranged StatusQuo's script for an other point of view:
Code: Select all
'///////////////////////////////////////////////////
' NOW v0.2b (W) StatusQuo 2008 - 2010
' small VBS-script for TC content plugin SCRIPT.WDX (http://www.totalcmd.net/plugring/script_wdx.html)
'///////////////////////////////////////////////////
' Purpose:
' Returns the current system date & time.
' Usage in MRT, Alt+F7 search etc.:
'///////////////////////////////////////////////////
'Basics:
myYear = Year(Date)
myMonth = Right("0" & Month(Date), 2)
myDay = Right("0" & Day(Date), 2)
myHour = Left(Time, 2)
myMinute = Mid(Time, 4, 2)
mySecond = Right(Time, 2)
myDateDelimiter = "."
myTimeDelimiter = ""
myDateTimeDelimiter = " - "
'Some default formats:
'YMD "script > Result1"
content1 = myYear & myDateDelimiter & myMonth & myDateDelimiter & myDay
'DMY "script > Result2"
content2= myDay & myDateDelimiter & myMonth & myDateDelimiter & myYear
'HHMMSS "script > Result3"
content3 = myHour & myTimeDelimiter & myMinute & myTimeDelimiter & mySecond
'HHMM "script > Result4"
content4 = myHour & myTimeDelimiter & myMinute
'YMD + HHMM "script > Result5"
content5 = content1 & myDateTimeDelimiter & content4
'Just set the default for "script > Result":
content=content5
'More examples:
content6 = "(" & content1 & "_" & content4 & ")"
content7 = "(" & content1 & " at " & myHour & "," & myMinute & ")"
Alternatives Plugin
WinScript Advanced (32-Bit und 64-Bit)
http://ghisler.ch/board/viewtopic.php?t=44032
"CurrentDate.vbs"
http://ghisler.ch/board/viewtopic.php?t=44057
- - -
Content WDX Plugin: Boolean for Today and Yesterday Heute Gestern
WDX content plugin "filesys" (filesys sample plugin v2.5 from 31.Jan.2019)
Adds new fields "
Today" and "
Yesterday" give back a
Boolean "Yes" or "No"
for current DATE (NOT the date in numbers as an string itself)
This works fine for Search for files created "
Today" and "
Yesterday",
and so for "Color by filetype" files created "
Today" and "
Yesterday" too.
Note: This doesn't work for MRT (Multi-rename tool):
[N1-8]
[=filesys.Heute] [=filesys.Gestern]
12345678 Ja Nein.ext
But for MRT, to add the current date&time, we can still use [T3]:
[N1-8]
[T3] [YMD] - [hms]
12345678 20190131 - 1314.ext (Jan 31, 2019 13:14)
In MRT press F1:
[T1] After this position, use last modification date/time from renamed file for all date/time fields (default).
Note: These are just switches! Use them with the other time placeholders, e.g. [T1][YMD] [hms]
[T2] After this position, use current date/time (when rename dialog was opened)
[T3] After this position, use current date/time (when rename options were last changed)