SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Long command strings over RARunandWait
Goto page Previous  1, 2
 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Long command strings over RARunandWait
Author Message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
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 View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
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 View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
Can I get the carriage return into rafilesave?
Wed Mar 12, 2008 6:55 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
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 View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
When you run the batch file manually what is printed to the screen?
Wed Mar 12, 2008 8:54 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
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 View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.