I'm using usually not FTP feature of UltraEdit and therefore needed a while to setup an environment where I can look on this issue.
A macro containing
IfExtIs,
IfFTP or
IfNameIs executed manually works fine in UE v24.10.0.35 also for files loaded via FTP.
The macro command must be for your file:
IfNameIs "aml_excprpt_01_ods_extr.sas.saslog"
So executing the macro manually after loading the file via FTP works. The file name with extension and path is in UltraEdit:
FTP::AccountName\//rsmprod/sasautos/logs/1027|aml_excprpt_01_ods_extr.sas.saslog.21420
That is displayed with using default settings of UltraEdit 24.10.0.35 in title bar of UltraEdit's main application window.
So there is no problem with correct detecting that the file name is
aml_excprpt_01_ods_extr.sas.saslog.
But when the same macro is used for automatic execution on each file load, the macro commands
IfExtIs,
IfFTP and
IfNameIs do not work for files loaded via FTP/FTPS/SFTP as expected. There are only working for files loaded from a local storage media, network drive or network share using UNC path.
It looks like the data accessed by the 3 commands
IfExtIs,
IfFTP and
IfNameIs are not set for FTP/FTPS/SFTP loaded files correct at the time when the macro is executed on file load.
I wrote following macro for execution on each file load for a file with
test.txt as name to verify this assumption:
Code: Select all
InsertMode
ColumnModeOff
HexOff
IfNameIs "test"
"Name is test"
Else
IfNameIs ""
"Name is empty"
Else
"Name is unknown"
EndIf
EndIf
IfExtIs "txt"
" - extension is txt"
Else
IfExtIs ""
" - extension is empty"
Else
" - extension is unknown"
EndIf
EndIf
IfFTP
" - no FPT file"
Else
" - is FTP file"
EndIf
CopyFilePath
"
"
Paste
"
"
And it was really interesting for me to see what this macro writes into the file
test.txt on loading it via FTP and when executed it after loading once again manually. The macro completely confirms what I thought.
I reported this issue to IDM support by email as it should not make a difference on macro execution on file load if the file is loaded via FTP/FTPS/SFTP or from a local storage media, network drive or network share.
And while playing around to investigate this issue I detected another issue with macro execution on file load with UE v24.10.0.35. The macro to execute on load 1 times is executed twice when a file not loaded via FTP/FTPS/SFTP is opened from recently opened or recently closed list. Opening the file with other methods like using
File - Open or drag & drop from another application into UltraEdit main window or using
Quick Open or double clicking on
Explorer tab of
File View or drag & drop the file from
Explorer tab of
File View into document window area work as expected with only one execution of the macro. The other methods to open a file were not tested by me up to now. I reported this second issue also by email to IDM support.