I want to simplify those lines via a loop For ... Do , is this possible?
We see here that the file name = the name of the bases to be loaded.
Code: Select all
@echo off
Set User=user1
Set BaseDonnee=Test
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.ACTID FROM 'C:\Rep\ACTID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.ACTIH FROM 'C:\Rep\ACTIH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CBUDD FROM 'C:\Rep\CBUDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CCOUD FROM 'C:\Rep\CCOUD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CCOUH FROM 'C:\Rep\CCOUH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CDEVD FROM 'C:\Rep\CDEVD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CFINH FROM 'C:\Rep\CFINH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CIMOD FROM 'C:\Rep\CIMOD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CPCED FROM 'C:\Rep\CPCED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CPERD FROM 'C:\Rep\CPERD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CPFTD FROM 'C:\Rep\CPFTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CPFTH FROM 'C:\Rep\CPFTH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CPMTD FROM 'C:\Rep\CPMTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CTVAD FROM 'C:\Rep\CTVAD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.DACTD FROM 'C:\Rep\DACTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.DFOND FROM 'C:\Rep\DFOND.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.DFONH FROM 'C:\Rep\DFONH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.DIVID FROM 'C:\Rep\DIVID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.EOTPD FROM 'C:\Rep\EOTPD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.FONDD FROM 'C:\Rep\FONDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.FONDH FROM 'C:\Rep\FONDH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.GACHD FROM 'C:\Rep\GACHD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.GMDSD FROM 'C:\Rep\GMDSD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.LOCID FROM 'C:\Rep\LOCID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.MPMTD FROM 'C:\Rep\MPMTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.OACHD FROM 'C:\Rep\OACHD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.PAYSD FROM 'C:\Rep\PAYSD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.REGID FROM 'C:\Rep\REGID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.SOCID FROM 'C:\Rep\SOCID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFONH FROM 'C:\Rep\TFONH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TIMPD FROM 'C:\Rep\TIMPD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TOPED FROM 'C:\Rep\TOPED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TPIED FROM 'C:\Rep\TPIED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TTIED FROM 'C:\Rep\TTIED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.AXE1D FROM 'C:\Rep\AXE1D.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.CFIND FROM 'C:\Rep\CFIND.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.FIMOD FROM 'C:\Rep\FIMOD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.LOCMD FROM 'C:\Rep\LOCMD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.NATDD FROM 'C:\Rep\NATDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.PROJD FROM 'C:\Rep\PROJD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TFOND.TXT' DELIMITERS '|';"
I tried like this with echoing the result to a file, just to take a look for the output :
Code: Select all
@echo off
setlocal enabledelayedexpansion
mode con:cols=60 lines=6
Set Bases=Base.ACTID Base.ACTIH Base.CBUDD Base.CCOUD Base.CCOUH Base.CDEVD Base.CFINH Base.CIMOD Base.CPCED Base.CPERD Base.CPFTD Base.CPFTH Base.CPMTD Base.CTVAD Base.DACTD Base.DFOND Base.DFONH Base.DIVID Base.EOTPD Base.FONDD Base.FONDH Base.GACHD Base.GMDSD Base.LOCID Base.MPMTD Base.OACHD Base.PAYSD Base.REGID Base.SOCID Base.TFONH Base.TIMPD Base.TOPED Base.TPIED Base.TTIED Base.AXE1D Base.CFIND Base.FIMOD Base.LOCMD Base.NATDD Base.PROJD Base.TFOND
Set files=C:\Rep\ACTID.TXT C:\Rep\ACTIH.TXT C:\Rep\CBUDD.TXT C:\Rep\CCOUD.TXT C:\Rep\CCOUH.TXT C:\Rep\CDEVD.TXT C:\Rep\CFINH.TXT C:\Rep\CIMOD.TXT C:\Rep\CPCED.TXT C:\Rep\CPERD.TXT C:\Rep\CPFTD.TXT C:\Rep\CPFTH.TXT C:\Rep\CPMTD.TXT C:\Rep\CTVAD.TXT C:\Rep\DACTD.TXT C:\Rep\DFOND.TXT C:\Rep\DFONH.TXT C:\Rep\DIVID.TXT C:\Rep\EOTPD.TXT C:\Rep\FONDD.TXT C:\Rep\FONDH.TXT C:\Rep\GACHD.TXT C:\Rep\GMDSD.TXT C:\Rep\LOCID.TXT C:\Rep\MPMTD.TXT C:\Rep\OACHD.TXT C:\Rep\PAYSD.TXT C:\Rep\REGID.TXT C:\Rep\SOCID.TXT C:\Rep\TFONH.TXT C:\Rep\TIMPD.TXT C:\Rep\TOPED.TXT C:\Rep\TPIED.TXT C:\Rep\TTIED.TXT C:\Rep\AXE1D.TXT C:\Rep\CFIND.TXT C:\Rep\FIMOD.TXT C:\Rep\LOCMD.TXT C:\Rep\NATDD.TXT C:\Rep\PROJD.TXT C:\Rep\TFOND.TXT
For %%A in (%Bases%) Do ( set var1=%%A
For %%B in (%files%) Do ( set var2=%%B
echo "C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U %User% -d %BaseDonnee% -c "SET CLIENT_ENCODING TO 'UTF8'; COPY !var1! FROM '!var2!' DELIMITERS '|';"
)
)>t.txt
start "" t.txt
pause
But without sucess ?
I get as output result like this :
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\ACTID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\ACTIH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CBUDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CCOUD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CCOUH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CDEVD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CFINH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CIMOD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CPCED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CPERD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CPFTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CPFTH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CPMTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CTVAD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\DACTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\DFOND.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\DFONH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\DIVID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\EOTPD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\FONDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\FONDH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\GACHD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\GMDSD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\LOCID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\MPMTD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\OACHD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\PAYSD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\REGID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\SOCID.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TFONH.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TIMPD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TOPED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TPIED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TTIED.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\AXE1D.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\CFIND.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\FIMOD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\LOCMD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\NATDD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\PROJD.TXT' DELIMITERS '|';"
"C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -U user1 -d Test -c "SET CLIENT_ENCODING TO 'UTF8'; COPY Base.TFOND FROM 'C:\Rep\TFOND.TXT' DELIMITERS '|';"
Thank you for your help !