An automated series of instructions carried out in a specific order, such as a Windows script created to launch a specific program on startup.

learn more… | top users | synonyms (1)

0
votes
2answers
19 views

Perform scp-then-ssh in one connection

Both at work and at home I tend to do the following very often: $ scp "SomeScriptIJustCreatedOrModified.sh" some-server: $ ssh some-server ./SomeScriptIJustCreatedOrModified.sh arguments And ...
32
votes
9answers
62k views

How can I run an application with command line arguments in Mac OS

Is there any easy way to append command line arguments to an application on a Mac? For example, to run Opera in kiosk mode or to use a different profile in Firefox, I can type $ ...
25
votes
9answers
3k views

How can I delete everything after the first column in Notepad++?

I'm trying to get rid of everything after a column in Notepad++. Column mode is not an option. Is it possible? What I have: 70.97.110.40 159 ms [n/a] 21 ...
0
votes
1answer
2k views

List Mapped Drives of All Users

I often have to replicate the mapping of drives of one machine to another. While I know how to easily output the data for the CURRENT user I have not found a way of doing this for others who are not ...
0
votes
1answer
72 views

Batch Script to Find Certain words and delete those lines in a file

Say i have following 4 lines in abc.txt file "@yuy007 what are you doing friend" "STFU, i dont care what you think @happy555" "@social8guy888 @goodbye999 ok mate see you at the subway :)" "btw arnold ...
13
votes
8answers
1k views

Bash Script to repeat every word in a line?

I have a string like: dog cat bird whale And I want to get dog dog cat cat bird bird whale whale All the words are in the same line. Any idea?
7
votes
2answers
3k views

Playback random section from multiple videos changing every 5 minutes

I'm setting up the A/V for a holiday party this weekend and have an idea that I'm not sure how to implement. I have a bunch of Christmas movies (Christmas Vacation, A Christmas Story, It's a ...
0
votes
0answers
6 views

Is it possible to script 'duplicate display on 2 & 3' in Windows 7?

We have about 300 computers that have three displays connected to them: One DVI, one DisplayLink USB/DVI, and and HDMI projector. We would like to duplicate 2 & 3 (USB & HDMI). Windows Key + P ...
0
votes
1answer
49 views

Batch Script to Trim lines in text to first 30 or 50 characters only

I am now new to scripts but i find it really difficult understanding "for" command (especially with that tokens and delimiters etc) . Saying so, i think that for command can be used to do what i am ...
1
vote
2answers
51 views

How can I add, from another operating system, a script for execution on the next Windows boot?

Also known as: adding a script on some Windows startup without booting it I have a multiple operating systems computer, one of them is Windows, and I would like to add some .cmd script to the ...
2
votes
2answers
146 views

How to add extensions to a lot of files using content of each file?

I've got over 10,000 files that don't have extensions from older versions of the Mac OS. They're extremely nested in file structure, and they also have all sorts of strange formatting and characters. ...
6
votes
1answer
12k views

Set Permanent Environmental Variable in Windows XP

I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3? command SETX ...
0
votes
0answers
128 views

Windows xp/ Windows 7 copy command behavior

We have a folder to which a lot of people copy files. Instead of over writing the existing file on the folder, I would like to rename the original file first, and then copy the new file. Example: ...
13
votes
5answers
31k views

Automatically run a script when I log on to Windows

How can I automatically run a script when I log on to Windows? I'd like to run this whenever I log into my computer: echo %USERNAME% logged on at %DATE% %TIME% >> log.txt A bonus would be to ...
0
votes
1answer
17 views

Autohotkey on a win8 tablet: three clicks for an action

I would love to use three clicks on my tablet to perform an action such as ^w (closing chrome windows). I have tried with "RapidHotkey" script but to no avail. I would greatly appreciate your help. ...
0
votes
0answers
15 views

Uninstalling programs MSIEXEC always takes the same time to run

I've created a script that removes all of the SQL bits and pieces left over when you do an appwiz.cpl removal of SQL. Initially some components failed because of 'there is another installation in ...
1
vote
1answer
5k views

Batch file script for Enable & disable the “use automatic Configuration Script”

My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set ...
1
vote
1answer
47 views

How can I move files into a folder based on their name?

I have several .pdf and .tex-files in a certain folder "ABC". They all are named by the scheme C01S02_Word.pdf C03S02SS01_Description_random_words.pdf C04S01SS02_More_words.pdf and so forth C in ...
2
votes
1answer
2k views

How to add a network (IP) printer using command line or a script?

My company will be deploying a bunch of laptops that will be used during a seminar for people to sign up for services on our website. At the end of the signup process they will need to print out a ...
1
vote
1answer
33 views

Changing desktop background depending on the time of day via script Windows 8.1

Hello it is my first time using this website so I hope I am not asking the question in wrong format. Anyways, as the title says I have a similar problem to a thread that was answered a while ago that ...
0
votes
3answers
3k views

How to Find User Name and IP address of users Logged on a Remote System

How can I find user name(of the local machine) of the last logged on user on a remote system. Is there any command or script we can use? I am able to capture IP address of the local machine of the ...
0
votes
2answers
39 views

Move *.wav files to new sub folder in multiple folders

On my Windows 7 x64 system, I have in my music folder both *.mp3 and *.wav files in a directory structure similar to this: D:\users\username\Music\Music\Artist\Album\musicfiles I'd like to move all ...
0
votes
3answers
2k views

Override mapped drive name using .bat script?

I have the following batch script which is successfully mapping a few of our drives for our users: @echo off net use * /delete /yes net use x: \\192.168.1.52\xrays net use s: \\192.168.1.52\common ...
1
vote
3answers
445 views

Script that runs as a user at boot time

In windows server, I would like to start applications when the machine boots up that would be running when I remote log-in using terminal services. Is this possible? I specifically need it to start ...
0
votes
1answer
22 views

Command fails in a script?

I'm trying to script the OpenSSL ec command. The script is used to validate a collection of keys produced by another library. The script is shown below after the question. The following works from a ...
93
votes
16answers
45k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
1
vote
2answers
2k views

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened?

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened? (While preferably, supporting Unicode filenames too.) I've already looked ...
1
vote
5answers
6k views

How do I check the outcome of a ftp script with a bat file? [closed]

I have a .bat file that runs a ftp script, grabbing files from the server and copying them to my machine. Works great. I now want this .bat file to report if any of these errors occured. If you ...
0
votes
0answers
20 views

How to start application after login on CentOS? [duplicate]

I am trying to start GUI application with upstart script on CentOS. I have test script located /etc/init/ folder. start on desktop-session-start stop on desktop-shutdown respawn script export ...
0
votes
1answer
36 views

How to start GUI application with upstart?

I have struggled with this problem for three days and I have tried many ways to solve it but not successful yet. I hope you guys can help me... I have an GUI application. I want to start this ...
1
vote
1answer
746 views

removing special characters from entire directory structure

I would like to know whether it is possible to REMOVE special characters recursively in powershell from all files in an entire directory structure? for example if I have a file called: my ...
0
votes
1answer
21 views

Script to open a chrome extension URL

I want to be able to create a keyboard shortcut to Dewey (a Chrome extension for bookmark management) using BetterTouchTool. BetterTouch tools allow opening urls, but if I try entering the URL ...
1
vote
3answers
20k views

How to disable Symantec Endpoint protection temporarily?

I would like to temporarily disable Norton anti virus. I know that this is done by right clicking the Norton icon in the Windows tray and then clicking enable/disable. What I would like to do is ...
1
vote
1answer
851 views

How can i automatically (silently) copy files off removable devices?

I'm looking for a way to automatically have my computer copy all files (or specific files based on extension) from removable devices plugged in (USB sticks/HDDs/phones etc) to a designated folder on ...
-1
votes
0answers
12 views

automatic windows installer with scripts executed after it

i have a program i want to install and then a copy some files and edit some other files. I want to get all of these things into one setup because a really beginners will use it and its hard for ...
0
votes
2answers
5k views

How to install Nagios + Centreon in centOS 6?

I already tried many tutorials over the internet trying to setup nagios and centreon to work together in centOS 6.4. What I want is to run a script and it does everything, I should go to centreon web ...
0
votes
1answer
2k views

How to make PuTTY's font automatically change color (while connected to a Linux server) as I did with Windows cmd.exe using a background batch script?

I was able to create a Windows Command Prompt that automatically changes its text color on a white background every ~1.5 seconds, thanks to the help of @dbenham and @Woody. I also use PuTTY every day, ...
0
votes
1answer
2k views

Local group policy logon startup script not executing

This is for Windows 7 I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in ...
0
votes
2answers
30 views

tee causing bash scripts to hang

I have a script that calls a number of other install scripts ./script1.sh 2>&1 | tee script1.log<br> ./script2.sh 2>&1 | tee script2.log<br> ./script3.sh 2>&1 | tee ...
2
votes
2answers
2k views

Unable to remove network printers via script in Windows 7

I've tried removing several network printers via rundll32 printui.dll, PrintUIEntry /dn /dd /q /n \\SERVER\PRINTER also tried the /dl but nada and WSHNetwork.RemovePrinterConnection ...
-1
votes
0answers
32 views

Windows script to copy files from C:\ to Backup B:\ but leave a SYMLINK copy back on C:\

I have a particular way to "backup" my stuff, in that I copy everything large (movies) etc from my main drive C:\ to an external backup drive B:\. Then make a SYMLINK of the file on B:\ back to C:\, ...
1
vote
2answers
207 views

Batch file to move files to directories in round-robin fashion

I am trying to have a batch file that moves ".doc" files to a folder. The trick is that i have three user folders named Mark, Luke and John that I want these files to go to. Example, aa.doc is in a ...
5
votes
5answers
13k views

How to replace a single character in Windows filenames using a batch file?

I have a Windows Server 2003 server that has a whole bunch of filenames that need renaming. Basically, I just need all - (hyphens) replaced with _ (underscores), no matter where they are in the ...
2
votes
1answer
3k views

Outlook 2010 - using a VBA script in a rule

I was following the directions in a great post when I got to the step for selecting the name of the script to run. I have VB code in ThisOutlookSession, but for some reason, the name of the procedure ...
0
votes
2answers
35 views

How to make a bash script wait and then continue running?

So I have a .sh script. I would like to wait 25 minutes and then continue running, NOT repeat. Its something like this: #!/bin/bash /bin/bash ~/path/script.sh I want it to kill a process after ...
7
votes
5answers
3k views

How to find newest files in a directory, including subdirectories?

I'm looking for a way in Windows to list all files in a given directory and its subdirectories, sorted so that the newest files are on top. Is there any easy way to do this? I'd also settle for a Perl ...
55
votes
13answers
17k views

Add directory to $PATH if it's not already there

Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct ...
20
votes
7answers
88k views

Running bat file at startup as administrator in Windows 7

I'm currently running a startup script in form of a bat file successfully in Windows 7 (I've inserted a new registry key entry with the bat file path as value in ...
-2
votes
0answers
19 views

how to automate the putty to do health checks on switches

As a daily task i have to do health check on switches for nearly 100 switches using putty. am using only two commands for all these switches. And i have to save the output of each switches in excel ...
0
votes
1answer
56 views

Mavericks startup script

I am trying to write a small script to launch when user logs on. I have searched and got the script to work but unable to run at log on with .plist We have active directory setup. When the user logs ...