Randi Randwa

Greenhorn
+ Follow
since Feb 21, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Randi Randwa


Do you have biterscripting ( http://www.biterscripting.com ) installed on the remote computer ? If it is, you can use this approach. (If not, you can always download free.)

Anytime you want to execute a batch file on the remote system, create a batch file on that remote system at, say, C:/Testing/file.bat. (This can be done using shared folders. ). Then write the following bite script on that remote system.






Copy and paste the above script into a script file C:/Scripts/RemoteExec.txt, then invoke the script by scheduling the following command in task scheduler.







The above command can be called directly from a Java program if needed.









14 years ago

No special setup should be needed.

You will need read access to the remote file being read. Try first, just to read the file with the simple cat command as follows - try the various addressing formats I specified in the previous post.




or



If the command succeeds, you have read access. Then you can use any scripts with that file.

14 years ago


It is a good idea never to install anything on the server for security reasons. But, you can access server log files (for reading).

To process a log file, you can use something similar to http://www.biterscripting.com/SS_WebLogParser.html . You can run this script directly on a remote file as follows. Enter the following command in biterscripting.




or



Or, if you have mapped the shared folder with a drive name X:



You can even access the log file over the internet




Of course, you can also use it on a local file

You can even access the log file over the internet




14 years ago

To get the value between <Id></Id>, a script like the following perhaps ?




This script is in biterscripting language, but any scripting language will do. The first stex command (string extractor) extract everything upto <Id> from $xml and sends it to null (thus removes it). The second stex command removes everything starting with </Id>. Whatever is left in $xml is the value, which is echo'ed.

I am using -c (ignore case), so id, Id, ID will all match.

Randi



If you are going the scripting or command-line route, there is a good sample script posted at http://www.biterscripting.com/SS_WebLogParser.html .

14 years ago

This is an interesting problem. I may have come across it a time or two.

Facts:
1. When large files are copied, OS will create the node for that file before completing the copying and writing EOF. Other applications can see and read that file. They can not write, rename, move or delete that file.
2. In terms of speed, rename is faster than move. And move is faster than copy.
3. Rename CAN NOT occur until EOF is written, that is, until file is completed copying.
4. I am assuming the file in question and the application/scripts are all on a local system. FTP files have slightly different facts.

Is the question here:

How can I ensure that the receiving application does NOT see the file until it is completed copying ?



Randi
14 years ago

You can also use biterscripting (.com for free download) for parsing html. It works great.

They have a sample script posted at http://www.biterscripting.com/SS_URLs.html . This script extracts referenced URLs from a page. Another sample script http://www.biterscripting.com/SS_SearchURL.html will search a page for specific search words. The sample script http://www.biterscripting.com/SS_SearchWeb.html is de facto your own search engine.

You can get started with these scripts.

If you come up with new html parsing scripts of your own, can you please post them for the rest of us ? Thanks.

Randi
15 years ago