combining text file issues

  • Thread starter Thread starter carrie schmid
  • Start date Start date
C

carrie schmid

any help with making this work, I'd appreciate it. thanks


Shell ("CMD.EXE /C COPY c:\SMART\GND_PHYSICALS.txt + c:\SMART\GND_GROUND.txt
+ c:\SMART\GND_RECREVIEW.txt + c:\SMART\GND_CHAMBER.TXT c:\SMART\GND.txt")
 
carrie schmid said:
any help with making this work, I'd appreciate it. thanks


Shell ("CMD.EXE /C COPY c:\SMART\GND_PHYSICALS.txt +
c:\SMART\GND_GROUND.txt
+ c:\SMART\GND_RECREVIEW.txt + c:\SMART\GND_CHAMBER.TXT c:\SMART\GND.txt")

The problem is the file names are longer than 8.3

There is more than one solution, but the easiest (IMO) is to rename the
files before copying, something like:

ChDir "c:\SMART"
Name "GND_PHYSICALS", "GND_P"
Name "GND_GROUND", "GND_G"
Name "GND_RECREVIEW", "GND_R"
Name "GND_CHAMBER", "GND_C"
Shell "CMD.EXE /C COPY GND_P.txt + GND_G.txt + GND_R.txt + GND_C.txt
GND.txt"
 
carrie schmid said:
any help with making this work, I'd appreciate it. thanks


Shell ("CMD.EXE /C COPY c:\SMART\GND_PHYSICALS.txt +
c:\SMART\GND_GROUND.txt
+ c:\SMART\GND_RECREVIEW.txt + c:\SMART\GND_CHAMBER.TXT c:\SMART\GND.txt")


The problem is the file names are longer than 8.3

There is more than one solution, but the easiest (IMO) is to rename the
files before copying, something like:

ChDir "c:\SMART"
Name "GND_PHYSICALS" AS "GND_P"
Name "GND_GROUND" AS"GND_G"
Name "GND_RECREVIEW" AS "GND_R"
Name "GND_CHAMBER" AS "GND_C"
Shell "CMD.EXE /C COPY GND_P.txt + GND_G.txt + GND_R.txt + GND_C.txt
GND.txt"
 
Stuart McCall said:
The problem is the file names are longer than 8.3

There is more than one solution, but the easiest (IMO) is to rename the
files before copying, something like:

ChDir "c:\SMART"
Name "GND_PHYSICALS" AS "GND_P"
Name "GND_GROUND" AS"GND_G"
Name "GND_RECREVIEW" AS "GND_R"
Name "GND_CHAMBER" AS "GND_C"
Shell "CMD.EXE /C COPY GND_P.txt + GND_G.txt + GND_R.txt + GND_C.txt
GND.txt"

the code above was very helpful, however I need a bit more help. I am exporting the files from Oracle which I can do as GND_ PHYSICALS (oracle puts a space after the dash). VBA does not like the space. Any ideas, on how I can remove it? Thanks!
 
Back
Top