OS-Command

Posted by tltang1 on 19-Aug-2015 18:41

Hello,

I created a cmd file in progress 4gl.

In the 4gl it says "cp ../../input/filename* ../../input/filename2.txt".

However, when execute it in windows, it keeps complaining about ".." is not a valid command.

I could use os-dir and read through the matching file names and copy them, but I am afraid I would read so many files I don't want in that directory.

Is there a way to handle relative paths using "os-command" syntex?

Thanks.

Lisa

All Replies

Posted by ChUIMonster on 19-Aug-2015 19:44

You should use OS-COPY.


--
Tom Bascom

On Aug 19, 2015, at 7:41 PM, tltang1 <bounce-tltang1@community.progress.com> wrote:

Thread created by tltang1

Hello,

I created a cmd file in progress 4gl.

In the 4gl it says "cp ../../input/filename* ../../input/filename2.txt".

However, when execute it in windows, it keeps complaining about ".." is not a valid command.

I could use os-dir and read through the matching file names and copy them, but I am afraid I would read so many files I don't want in that directory.

Is there a way to handle relative paths using "os-command" syntex?

Thanks.

Lisa

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Frank Meulblok on 20-Aug-2015 03:22

Your command line must be one that the OS understands.

Since you're trying to run a Unix command line on a Windows machine, that's not the case here.

For starters:

- Windows uses "copy" instead of "cp"

- Windows uses backslashes "\" instead of forward slashes "/" to delimit directory names.

This thread is closed