Re: PITR on Win32 - Archive and Restore - Mailing list pgsql-hackers-win32

From Andrew Dunstan
Subject Re: PITR on Win32 - Archive and Restore
Date
Msg-id 1130.24.211.141.25.1092193183.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: PITR on Win32 - Archive and Restore  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: PITR on Win32 - Archive and Restore
List pgsql-hackers-win32
Bruce Momjian said:
>
> OK, next question.  Why does this work when compiled in MinGW and run
> from CMD.EXE:
>
>     # cat x.c
>     #include <stdio.h>
>
>     main()
>     {
>             system("copy \"c:/msys/1.0/home/bruce momjian/a b\"
>             \"c:/msys/1.0/home/bruce momjian/c d\"");
>     }
>     # gcc -o x x.c
>     # ./x
>             1 file(s) copied.
>
>     C:\msys\1.0\home\Bruce Momjian>x
>             1 file(s) copied.
>
> The path has forward slashes and spaces.
>
>

on XP Pro a similar test gives me:

C:\msys\1.0\home\adunstan>copytry
copy "c:/tmp/a b" "c:/tmp/c d"
The system cannot find the file specified.
        0 file(s) copied.

C:\msys\1.0\home\adunstan>dir c:\tmp
 Volume in drive C has no label.
 Volume Serial Number is D899-679E

 Directory of c:\tmp

08/10/2004  10:36 PM    <DIR>          .
08/10/2004  10:36 PM    <DIR>          ..
06/14/2004  05:33 PM             9,244 a b
06/14/2004  05:33 PM             9,244 INSTALL.LOG
               2 File(s)         18,488 bytes
               2 Dir(s)  51,230,498,816 bytes free

but with backslashes, I get:

C:\msys\1.0\home\adunstan>copytry
copy "c:\tmp\a b" "c:\tmp\c d"
        1 file(s) copied.

and with backslashes in the source only I get:

C:\msys\1.0\home\adunstan>copytry
copy "c:\tmp\a b" "c:/tmp/c d"
        1 file(s) copied.

go figure ...

cheers

andrew





pgsql-hackers-win32 by date:

Previous
From: markir@coretech.co.nz
Date:
Subject: Re: PITR on Win32 - Archive and Restore
Next
From: "Andrew Dunstan"
Date:
Subject: Re: PITR on Win32 - Archive and Restore