Re: PITR on Win32 - Archive and Restore

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <markir(at)coretech(dot)co(dot)nz>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-11 02:59:43
Message-ID: 1130.24.211.141.25.1092193183.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

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

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2004-08-11 03:08:33 Re: PITR on Win32 - Archive and Restore
Previous Message markir 2004-08-11 02:59:40 Re: PITR on Win32 - Archive and Restore

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-08-11 03:08:33 Re: PITR on Win32 - Archive and Restore
Previous Message markir 2004-08-11 02:59:40 Re: PITR on Win32 - Archive and Restore