Re: User Variable
Thanks for your confirmation.
Since the answer is not affirmative so I want to put your attention to the real problem which I am fetching.
I want a write a script to send an email "onDirCreated" event under SSH event.
I am using c_SendMail() function for this in lua script.
In 'c_SendMail' parameter I want to pass the directory name(which has been created) for subject of that email.
I had tried following variables and its output as given below
Variables: - Output(subjectt Line)
%LastDir - Uploaded:/home/ebook1/FTP_QC/Tally1-CRX-Done/RH3942
%PathName - Uploaded:<nothing>
%Dir - Uploaded:/
Can you suggest how can I get only last directory name (RH3942)?
I am trying evaluation version wingFTP server in Linux OS (Ubuntu 10.04)
Get Direcotory Name without path
-
- Site Admin
- Posts: 2083
- Joined: Tue Sep 29, 2009 6:09 am
Re: Get Direcotory Name without path
OK, if you use Lua script, you can get the filename with following script:
Code: Select all
local filepath = "%LastDir"
local filename = string.sub(filepath,string.len(filepath)-string.find(string.reverse(filepath),"/")+2)