Normal Topic Paste Several Textdatein into one Textfile (Read 675 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Paste Several Textdatein into one Textfile
Jun 2nd, 2010 at 11:00am
Print Post Print Post  
Hello!
I want to move several Textfiles  (Text1.tx ,text2.TXt ..)  in a Merge.txt file.
The number of text files is variable.
With "Move" command I get an error message: several files cannot be in a single file moved.

Hier is the Code:
IF vAuswahl = "ARCHITECT" Then
{
vFolder = "\\srv2003\Daten\ARCHITECT\Results1\"
n = @AsynchShell("Move " +  @Chr(34) + vFolder +      "*.TXT"            + @Chr(34) + " " + @Chr(34) + VFolder + "T1" + @Chr(34))
n = @AsynchShell("Copy " +  @Chr(34) + VFolder +  "T1\*.TXT"              + @Chr(34) + " " + @Chr(34) + VFolder + "T1\Merge.TXT"  + @Chr(34))
n = @AsynchShell("Move " +  @Chr(34) + VFolder +  "T1\*.TXT"           + @Chr(34) + " " + @Chr(34) + VFolder + "T2" + @Chr(34))
n = @AsynchShell("Del "    +  @Chr(34) + VFolder +      "*.TXT"            + @Chr(34) + " " + @Chr(34) + VFolder + "T2" + @Chr(34))
}


Thanks for the Help
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Paste Several Textdatein into one Textfile
Reply #1 - Jun 2nd, 2010 at 12:45pm
Print Post Print Post  
When using @AsynchShell, control returns to SBasic before the command invoked completes. You might want to use @Shell instead, so that each command can complete before the next one starts.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Paste Several Textdatein into one Textfile
Reply #2 - Jun 3rd, 2010 at 10:23am
Print Post Print Post  
Hello Mark!
I  thank you so much   for the quick help. I can nowhere else  get  a faster and good support as in this Forum.

Dr. Belhareth
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged