scripting

Are all scripts written in scripting languages?

I'm confused by the concept of scripts. Can I say that makefile is a kind of script? Are there scripts written in C or Java? ...

Language for Web Application with User Configurable Scripting ?

I'm an eager amatuer, and am rolling around an idea to use to 'sharpen my saw'. I want to start an app to allow; creation of forms by the userbase management of those forms filling in of those forms storing of forms These forms would require some level of scripting (i.e add Field 1 to Field 2 and put the result in Field 3), Ideally...

Changing prompt working directory via Python script

Is it possible to change the Windows command prompt working directory via Python script? e.g. >> cd >> c:\windows\system32 >> make_decision_change_dir.py >> cd >> c:\windows I have tried a few things which don't work: import os os.chdir(path) import os, subprocess subprocess.Popen("chdir /D \"%s\"" %path, shell=True) import ...

XSL tags inside javascript block

Hi, I need my XSL to add dynamic content to a javascript block. I am wondering if this is possible. Here is an example of what I want to do. The following code does NOT work: <script> // Loads the video. var s1 = new SWFObject("player-viral.swf","ply","670","350","9","#ffffff"); s1.addParam("allowfullscreen","true"); s1.addParam("a...

Why does this bash script require me to press enter to continue?

Hello all, I was kindly helped a few minutes ago by a user named Juliano and the script works fine but it just baffles me why it continues to work when I press enter, if I don't it just sits there untill I have to keep pressing enter. I thought that was the job of the for loop? #!/bin/bash TIMEFORMAT=%6R for file in /home/t...

Script block in XSL not being rendered

I can't get a <script></script> block in my XSL template to be rendered. It is simply being ignored by the parser, the block itself and anything inside it. By the way, I am using the DotNetNuke report module. Any ideas on how to solve this? Thanks. ...

BASH ^word^replacement^ on all matches?

To clarify, I am looking for a way to perform a global search and replace on the previous command used. ^word^replacement^ only seems to replace the first match. A quick check through a BASH history cheat sheet doesn't reveal anything. Is there some set option that is eluding me? Mainly curious... Thanks ...

.NET scripting

Can anyone provide an example of .NET scripting? Some dynamic languages support functions like eval() or compile() than let you compile and execute a string in run-time. VBCodeProvider seems to be a related namespace, but i can't find an example showing how to compile and execute code. Edit: I'm developing a ASP.NET site using VB.N...

How to execute an .SQL script file using c#

Hi I'm sure this question has been answered already, however I was unable to find an answer using the search tool. Using c# I'd like to run a .sql file. The sql file contains multiple sql statements, some of which are broken over multiple lines. I tried reading in the file and tried executing the file using ODP.NET ... however I don't ...

How to stop script from running?

I have the following Script, more +1 "C:\Documents and Settings\Administrator\Desktop\Backup Data\import file\1.txt" > "C:\Documents and Settings\Administrator\Desktop\Backup Data\import file\2.txt" "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "C:\Power Play\Daily\Daily.mdb" /x "Macro1" DEL "C:\Documents and Settings\Admi...

How can I count how many calls of a cmd file?

How can I count how many calls of a cmd file? I'm struggling with something like this but it didn't work: @IF NOT EXIST Calls.log echo. > Calls.log @for %%i in (Calls.log) do set size=%%~zi @IF %size% EQU 0 ( @ECHO 1 > Calls.log ) ELSE ( @set /p v=<Calls.log @set /A v+=1 @echo %v% > Calls.log ) ...

I want to make a conditional cronjob

I have a cron job that runs every hour. It accesses an xml feed. If the xml feed is unvailable (which seems to happen once a day or so) it creates a "failure" file. This "failure" file has some metadata in it and is erased at the next hour when the script runs again and the XML feed works again. What I want is to make a 2nd cron job ...

SQL Server - stop or break execution of a SQL script

Is there a way to immeidately stop execution of a SQL script in SQL server, like a "break" or "exit" command? I have a script that does some validation and lookups before it starts doing inserts, and I want it to stop if any of the validations or lookups fail. ...

How can I download Yahoo Groups?

I want to download some Yahoo Groups (files, photos, messages, memberlist) and I've found these scripts: http://freshmeat.net/projects/grabyahoogroup/ http://sourceforge.net/project/showfiles.php?group_id=62034 I've downloaded ActivePerl and the needed modules from CPAN (nothing fancy; they're very easy to find). I've managed to ins...

How to automate a process with the sqlite3.exe command line tool?

I'm trying to bulk load a lot of data ( 5.5 million rows ) into an SQLite database file. Loading via INSERTs seems to be far too slow, so I'm trying to use the sqlite3 command line tool and the .import command. It works perfectly if I enter the commands by hand, but I can't for the life of me work out how to automate it from a script ( ...

Prevent command prompt from closing automatically (CS Script)

I'm experimenting with CS-Script and my problem is that each time I run a script the console window is automatically closed when the script exits. How can I prevent this from happening? ...

Need to write a ruby script to create a csv file of the data on the website

There is a website which gives me the information of pin codes of a particular state for example indian postal website, gives the details when I select the state in the drop down. I need to write the script in ruby which would create the CSV file with all the data for a particular state. Today is my first day on ruby and not sure how ...

change physical path for virtual directory or site in IIS using command line for IIs6 or IIs7

I need to implement some versioning for deployment for the app I support where I can copy the site to say c:\inetpub\wwwroot\app_v2 and then switch the virtual directory from c:\inetpub\wwwroot\app_v1. Is there a way to change the physical path for a virtual directory in IIS from the command line? Edit: i found that in IIS7 you can ...

Best/Easiest/Quickest way to get relative path between two files?

I'm in the midst of some refactoring some C# code and part of this is to redo some references, because we're redoing the folder structure entirely. What I'd like to do is just go into the .csproj or .sln file and modify the paths. However some of the references have paths like "../../../../../../ThirdParty/SomeMicrosoftLibrary/bin/Debu...

Script for old Backups in sqlserver2000

Can anyone please send me the script to delete the old backup files greater than 2 days from the disk automatically? I am using SQL Server 2000. ...