follow up on this:
Code :
//utl_file_Convert_to_Posix
// $1 - text - Path to convert
//original :
//JorgeChB 2012-05-30 pathToUnix
//JorgeChB 2015-02-05
//Converts a Mac file path to a Posix form
//RETURNS - text - converted path
// • Created 3/24/15 by Chip -
C_TEXT($Path;$Path)
$Path:=$1
$Path:=Replace string($Path;"/";"__-sLaSh-__") //'a/b' ->
'a__-sLaSh-__b'
$Path:=Replace string($Path;":";"/") //'a:b' -> 'a/b'
$Path:=Replace string($Path;"__-sLaSh-__";":") //'a__-sLaSh-__b' ->
'a:b'
$Path:=Replace string($Path;"\\";"\\\\") //'a\\b' -> 'a\\b'"
$Path:=Replace string($Path;" ";"\\ ") //'a b' -> 'a\ b'
$Path:=Replace string($Path;"*";"\\*") //'a*b' -> 'a\*b'
$Path:=Replace string($Path;"'";"\\'") //'a'b' -> 'a\'b'
$Path:=Replace string($Path;"&";"\\&") //'a&b' -> 'a\&b'
$Path:=Replace string($Path;"\"";"\\\"") //'a"b' -> 'a\"b'
$Path:=Replace string($Path;"(";"\\(") //'a(b' -> 'a\(b'
$Path:=Replace string($Path;")";"\\)") //'a)b' -> 'a\)b'
$0:="/Volumes/"+$Path
On Fri, 20 Oct 2017 19:02:53 -0400, Chip Scheide via 4D_Tech wrote:
> Ill post mine on Monday. I got it from Jorge I think
>
>> On Oct 20, 2017, at 4:30 PM, Chip Scheide
>> <[email protected]> wrote:
>>
>>>> $command_t:="mv "+GetPOSIXfilePath ($folderPath_t)+"
>>> had trouble here -
>>> apparently 4D's (v13) Convert path system to POSIX command - fails to
>>> do what it is advertised to do.....
>>> Fortunately I had a routine already written to do this.
>>
>> That’s exactly why I wrote my own. I use the 4D Convert path system
>> to POSIX command but then Replace String for all spaces to “\ “.
>> That seems to make it work.
>>
>> Tim
>>
>> ********************************************
>> Tim Nevels
>> Innovative Solutions
>> 785-749-3444
>> [email protected]
>> ********************************************
>>
>>
> ------------
> Hell is other people
> Jean-Paul Sartre
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************