Author |
Message |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Hang on I fixed the case mismatch on Filehandle and filehandle and it seems to work now. odd behaviour.
|
|
Wed Mar 12, 2008 6:53 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Nope, false positive I must have opened it at a convenient time the batch after run now reads
挀尺摦屳灡汰捩瑡潩獮獜瑦捰獜瑦捰攮數ⴠ敫灹楡䙲汩㵥㩣屜敫獹屜摦畳楮牰⁶潲瑯ㅀ⸰㐲㠮⸳ㄲⴠ浣㵤異⁴㩣晜獤睜牯楫杮獜瑦瑰獥屴ㄲ⸰硴⁴潤湷潬摡㈯〱琮瑸琮灭※癭搠睯汮慯⽤ㄲ⸰硴浴⁰潤湷潬摡㈯〱琮瑸攊楸⁴䔥剒剏䕌䕖╌
|
|
Wed Mar 12, 2008 6:54 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Can I get the carriage return into rafilesave?
|
|
Wed Mar 12, 2008 6:55 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
When opening this file in Notepad, choose "Unicode" option in the file type and I think it will appear good on your screen.
|
|
Wed Mar 12, 2008 7:04 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
For carriage return use "\n" for Unix systems and "\r\n" for Windows, for example,
"line 1\nline 2\n"
|
|
Wed Mar 12, 2008 7:06 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
I am opening it in unicode and no change. Notepad displays it as a series of rectangles, firefox renders it differently.
When I try /r/n as the carriage return it writes out ok (no heiroglyphs) but then when I run the batch the first line is not running, just the exit one.
|
|
Wed Mar 12, 2008 7:44 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
When you run the batch file manually what is printed to the screen?
|
|
Wed Mar 12, 2008 8:54 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
It closes itself too quickly to see, if it was running the first line it would take at least 5-10 seconds to run and I would be able to see.
|
|
Wed Mar 12, 2008 9:17 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
It must be some kind of different character set issue. I'm trying to reproduce it locally on my system.
In a mean time you can try running the batch file like
my_file.bat > my_log.log
This way you don't need to see what is flashing on the screen. You could see it after the run in the output log file.
|
|
Wed Mar 12, 2008 9:31 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
the pipe gives me
C:\fds\scripts>exit 0
Which is of course the second line.
I think I've found something. When I look in the Hex representation of the batch file I see a hex 00 at the beginning.
When I take the rafilesave out of the creating JAL script that 00 is not produced and running the batch file produces the correct behaviour.
The RAfilesave was in there to supply a blank canvas to the rafileopen and rafilewrites.
How can I remove the batch file either before or after writing it again?
RARunandwait(del /q c:\\fds\\scripts\\sftpop.bat) gives me the old cannot find file error.
|
|
Wed Mar 12, 2008 9:45 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
You can delete that file using simple RARunAndWait("cmd /C del my_batch.bat", ...
I guess, you could also have a static batch file and just pass the variable parameters such as file names, user, password via command line parameters for the batch
|
|
Thu Mar 13, 2008 2:53 am |
|
 |
|