RE: v13+ LEP - What is sent to OS

2018-04-12 Thread Epperlein, Lutz (agendo) via 4D_Tech
AFAIK it is installed per default since Win XP, I'm sure that is installed in 
Win 7 and Win 10 and of course in the matching server versions.

Regards
Lutz

> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chip 
> Scheide via
> 4D_Tech
> Sent: Thursday, April 12, 2018 5:07 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: Chip Scheide <4d_o...@pghrepository.org>
> Subject: Re: v13+ LEP - What is sent to OS
>
> I will investigate further, but as I understand:
> Robocopy is an EXTERNAL dos command, and as such is not (or may not) be
> installed on some/all Windows systems.
>
> xCopy is part of command.com, and as such exists on all windows systems
> (at least all that would be in use today).
> Chip
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ LEP - What is sent to OS

2018-04-12 Thread Chip Scheide via 4D_Tech
I will investigate further, but as I understand:
Robocopy is an EXTERNAL dos command, and as such is not (or may not) be 
installed on some/all Windows systems.

xCopy is part of command.com, and as such exists on all windows systems 
(at least all that would be in use today).
Chip

On Wed, 11 Apr 2018 15:50:39 -0600, Kenneth Geiger via 4D_Tech wrote:
> Have you tried ROBOCOPY instead of XCOPY?
> 
>> On Apr 11, 2018, at 1:38 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I think the problem is in escaping the file path.
>> I'm trying to get xCopy to work.
>> 
>> I have tried a variety of variations, none of which want to work.
>> That is why I would like to see what it is that LEP is handing off to 
>> the OS
>> 
>> 
>> On Wed, 11 Apr 2018 19:31:34 +, Timothy Penner wrote:
>>> Hi Chip,
>>> 
>>> I agree with Tim Nevels' approach. It’s very solid.
>>> 
>>> Another thing to add, is that sometimes you may need to call the 
>>> actual cmd.exe and feed your command into that, as described in this 
>>> tech tip:
>>> http://kb.4d.com/assetid=76658
>>> 
>>> On windows that would be like this:
>>> 
>>> $theRestOftheCommand:="cp thisFile here"
>>> $command_t:="cmd.exe /C "+$theRestOftheCommand
>>> LAUNCH EXTERNAL PROCESS($command_t)
>>> 
>>> Regarding this:
 I have done the set text to pasteboard thing, and I have pasted into 
 a .bet file -- it works.
>>> 
>>> Pasting it into a batch (I assume you meant .bat file) is not the 
>>> same as running it in the Command Interpreter; for example, a batch 
>>> file lets you execute multiple lines as a batch, while the Command 
>>> Interpreter (and 4D's LEP) only lets you execute one line at a time.
>>> 
>>> Also, if the .bat file works, then you could always try executing the 
>>> .bat file from 4D using LEP.
>>> 
>>> -Tim
>>> 
>>> 
>>> 
>>> Timothy Penner
>>> Senior Technical Services Engineer
>>> 
>>> 4D Inc
>>> 95 S. Market Street, Suite #240
>>> San Jose,CA 95113
>>> United States
>>> 
>>> Telephone: +1-408-557-4600
>>> Fax:   +1-408-271-5080
>>> Email: tpen...@4d.com 
>>> Web:   www.4D.com 
>>> 
>> ---
>> 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: https://lists.4d.com/mailman/options/4d_tech 
>> 
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>> 
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v13+ LEP - What is sent to OS

2018-04-12 Thread Epperlein, Lutz (agendo) via 4D_Tech
I second this recommendation. Robocopy is far better and more flexible than 
xcopy.
But the problem with escaping of paths remains the same.

Regards
Lutz

> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Kenneth 
> Geiger
> via 4D_Tech
> Sent: Wednesday, April 11, 2018 11:51 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: Kenneth Geiger <kgeiger....@gmail.com>
> Subject: Re: v13+ LEP - What is sent to OS
>
> Have you tried ROBOCOPY instead of XCOPY?
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ LEP - What is sent to OS

2018-04-11 Thread Kenneth Geiger via 4D_Tech
Have you tried ROBOCOPY instead of XCOPY?

> On Apr 11, 2018, at 1:38 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I think the problem is in escaping the file path.
> I'm trying to get xCopy to work.
> 
> I have tried a variety of variations, none of which want to work.
> That is why I would like to see what it is that LEP is handing off to 
> the OS
> 
> 
> On Wed, 11 Apr 2018 19:31:34 +, Timothy Penner wrote:
>> Hi Chip,
>> 
>> I agree with Tim Nevels' approach. It’s very solid.
>> 
>> Another thing to add, is that sometimes you may need to call the 
>> actual cmd.exe and feed your command into that, as described in this 
>> tech tip:
>> http://kb.4d.com/assetid=76658
>> 
>> On windows that would be like this:
>> 
>> $theRestOftheCommand:="cp thisFile here"
>> $command_t:="cmd.exe /C "+$theRestOftheCommand
>> LAUNCH EXTERNAL PROCESS($command_t)
>> 
>> Regarding this:
>>> I have done the set text to pasteboard thing, and I have pasted into 
>>> a .bet file -- it works.
>> 
>> Pasting it into a batch (I assume you meant .bat file) is not the 
>> same as running it in the Command Interpreter; for example, a batch 
>> file lets you execute multiple lines as a batch, while the Command 
>> Interpreter (and 4D's LEP) only lets you execute one line at a time.
>> 
>> Also, if the .bat file works, then you could always try executing the 
>> .bat file from 4D using LEP.
>> 
>> -Tim
>> 
>> 
>> 
>> Timothy Penner
>> Senior Technical Services Engineer
>> 
>> 4D Inc
>> 95 S. Market Street, Suite #240
>> San Jose,CA 95113
>> United States
>> 
>> Telephone: +1-408-557-4600
>> Fax:   +1-408-271-5080
>> Email: tpen...@4d.com 
>> Web:   www.4D.com 
>> 
> ---
> 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: https://lists.4d.com/mailman/options/4d_tech 
> 
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
> 
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ LEP - What is sent to OS

2018-04-11 Thread Keisuke Miyako via 4D_Tech
typing code to the console program is not the same as calling CMD.exe via the 
CLI.

in general, with the console program, you only have to care about quoting 
arguments that contain a space because arguments are separated by space. 
however, when you call CMD.exe via the command line, you have to keep in mind 
that certain characters are escaped with a backslash, including the double 
quote. so if you have a path that ends with a backslash and you quote that 
path, you will end up escaping the closing double quote with the final 
backslash in your path. that makes the quote invalid. there is a way to double 
escape such string when passing arguments to CMD.exe via the command line.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ LEP - What is sent to OS

2018-04-11 Thread Keisuke Miyako via 4D_Tech
the values you pass as the first two arguments to LEP are passed “as is” to the 
CLI (well, actually they are converted from Unicode to ANSI if you use text not 
BLOB, but that is mostly irrelevant when your locale uses English) so you can 
just examine those variables. (I advise against passing string concatenated 
values instead of variable references to $1) it is also important to check what 
you get back in stdout and stderr. you need to understand that a different rule 
applies to escaping paths vs escaping generic string. in either case, it is not 
as simple as surrounding the value with double quotes. see my old post re: 
PATH_Escape and LEP_Escape



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v13+ LEP - What is sent to OS

2018-04-11 Thread Chip Scheide via 4D_Tech
I think the problem is in escaping the file path.
I'm trying to get xCopy to work.

I have tried a variety of variations, none of which want to work.
That is why I would like to see what it is that LEP is handing off to 
the OS


On Wed, 11 Apr 2018 19:31:34 +, Timothy Penner wrote:
> Hi Chip,
> 
> I agree with Tim Nevels' approach. It’s very solid.
> 
> Another thing to add, is that sometimes you may need to call the 
> actual cmd.exe and feed your command into that, as described in this 
> tech tip:
> http://kb.4d.com/assetid=76658
> 
> On windows that would be like this:
> 
> $theRestOftheCommand:="cp thisFile here"
> $command_t:="cmd.exe /C "+$theRestOftheCommand
> LAUNCH EXTERNAL PROCESS($command_t)
> 
> Regarding this:
>> I have done the set text to pasteboard thing, and I have pasted into 
>> a .bet file -- it works.
> 
> Pasting it into a batch (I assume you meant .bat file) is not the 
> same as running it in the Command Interpreter; for example, a batch 
> file lets you execute multiple lines as a batch, while the Command 
> Interpreter (and 4D's LEP) only lets you execute one line at a time.
> 
> Also, if the .bat file works, then you could always try executing the 
> .bat file from 4D using LEP.
> 
> -Tim
> 
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> San Jose,CA 95113
> United States
> 
> Telephone: +1-408-557-4600
> Fax:   +1-408-271-5080
> Email: tpen...@4d.com
> Web:   www.4D.com
> 
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v13+ LEP - What is sent to OS

2018-04-11 Thread Timothy Penner via 4D_Tech
Hi Chip,

I agree with Tim Nevels' approach. It’s very solid.

Another thing to add, is that sometimes you may need to call the actual cmd.exe 
and feed your command into that, as described in this tech tip:
http://kb.4d.com/assetid=76658

On windows that would be like this:

$theRestOftheCommand:="cp thisFile here"
$command_t:="cmd.exe /C "+$theRestOftheCommand
LAUNCH EXTERNAL PROCESS($command_t)

Regarding this:
> I have done the set text to pasteboard thing, and I have pasted into a .bet 
> file -- it works.

Pasting it into a batch (I assume you meant .bat file) is not the same as 
running it in the Command Interpreter; for example, a batch file lets you 
execute multiple lines as a batch, while the Command Interpreter (and 4D's LEP) 
only lets you execute one line at a time.

Also, if the .bat file works, then you could always try executing the .bat file 
from 4D using LEP.

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v13+ LEP - What is sent to OS

2018-04-11 Thread Chip Scheide via 4D_Tech
Thanks Tim,

(windows)
I have done the set text to pasteboard thing, and I have pasted into a 
.bet file -- it works.
I have typed - exactly - what I have for a command being fed to LEP and 
it works
run it through LEP and nothing...

That is why I want to see what LEP is feeding to the OS

On Wed, 11 Apr 2018 14:11:59 -0500, Tim Nevels via 4D_Tech wrote:
> On Apr 11, 2018, at 2:00 PM, Chip Scheide wrote:
> 
>> Is there a way to see exactly what is being sent to the (in this case) 
>> CMD, or Terminal?
> 
> Hi Chip,
> 
> Every time I am going to do a new LEP command, the first thing I do 
> is manually execute it in a Command or Terminal window on macOS. I don
> ’t even try to just code up the string and run it with LEP. Too many 
> times I’ve miss a space or a double-quote or I’m doing the wrong 
> thing all together.
> 
> So I first get the command working in the Terminal window. Then I 
> copy it and paste it as a comment in the 4D method. For future 
> reference. Then I write the code to create this command in the 
> method. I always put the entire command in a text variable like 
> $command_t.  I have a “debug” line in the method that does SET TEXT 
> TO PASTEBOARD($command_t). 
> 
> Now I run LEP and if it works I’m done. If not, I do a paste into 
> the Terminal window and run it and see what error messages are 
> displayed, or I see what I did wrong (i.e. missed a space or a 
> double-quote). 
> 
> That’s how I do it.
> 
> Tim
> 
> *
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> *
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v13+ LEP - What is sent to OS

2018-04-11 Thread Tim Nevels via 4D_Tech
On Apr 11, 2018, at 2:00 PM, Chip Scheide wrote:

> Is there a way to see exactly what is being sent to the (in this case) 
> CMD, or Terminal?

Hi Chip,

Every time I am going to do a new LEP command, the first thing I do is manually 
execute it in a Command or Terminal window on macOS. I don’t even try to just 
code up the string and run it with LEP. Too many times I’ve miss a space or a 
double-quote or I’m doing the wrong thing all together.

So I first get the command working in the Terminal window. Then I copy it and 
paste it as a comment in the 4D method. For future reference. Then I write the 
code to create this command in the method. I always put the entire command in a 
text variable like $command_t.  I have a “debug” line in the method that does 
SET TEXT TO PASTEBOARD($command_t). 

Now I run LEP and if it works I’m done. If not, I do a paste into the Terminal 
window and run it and see what error messages are displayed, or I see what I 
did wrong (i.e. missed a space or a double-quote). 

That’s how I do it.

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

v13+ LEP - What is sent to OS

2018-04-11 Thread Chip Scheide via 4D_Tech
Is there a way to see exactly what is being sent to the (in this case) 
CMD, or Terminal?

Thanks
Chip
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**