0

I'm using a vbscript to pscp a text file over to a Linux device on Centos 6 (httpd.conf). If I nano the file and paste in the text, apache will start just fine, but using pscp to transfer the same text file gives me errors.

  • I've tried changing permissions of the file, not the issue.
  • I've tried doing a Replace(text,vbcrlf,vblf), still no luck.
  • I'm using FSO.OpenTextFile(file, 2, True, 0) to make sure it's ASCII

Any other replacements I need to do, or parameter I need to use with PSCP?

Cameron Darlington
  • 355
  • 2
  • 7
  • 14
  • You might try sending your files both ways (use different names of course), then compare them on Centos using the diff command. Might give some notion if the files are really identical, or how they differ. (In true Unix fashion, diff will tell you absolutely nothing if the files are identical.) If you're really stuck, you could look at each one with 'od -ax ' to see what each one looks like at the byte level. – T W Bennet Jul 01 '21 at 01:50

1 Answers1

0

I've addressed the issue by using cat to create a new file after the transer

From my Windows Host:

pscp.exe C:\Myfile.conf username@linuxhost:tempfile.conf

Linux Host:

cat tempfile.conf > myfile.conf
rm -f tempfile.conf
Cameron Darlington
  • 355
  • 2
  • 7
  • 14