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
28 views

WOL remote Windows pc's at startup

I have five Windows 8.1 pc's all connected together to the same local network. I'd like to automatically switch on my 4 slaves when I power on my Master pc. All the machines are properly set up to ...
2
votes
2answers
887 views

Run a remote script/application in detached mode in Ansible

I am having trouble running a remote application startup script "detachedly" from an Ansible playbook. The script will run, but I can't get it to get/stay detached. I am probably doing something ...
-1
votes
1answer
19 views

Scripting sleep and wake up

I have an iMac that when it boots up the screen is all red and fuzzy, but if you put the Mac to sleep and wake it up again the screen is normal. Has anyone had this issue? If so what is it? I am ...
21
votes
4answers
14k views

zsh with Cygwin

How can I configure zsh to be the default shell under Cygwin?
0
votes
1answer
41 views

Remove substring from absolute path windows script

I am new to windows scripts and I have the absolute path like- /bin/debug/test/abc.xyz.dll and I want to remove the file name and get only path like output: /bin/debug/test/. How should I do that?
1
vote
1answer
464 views

Transform single column to multiple columns based on values

I have 1 column like below: AAA 999888 BBB 1111 BBB 2222 AAA 999777 BBB 3333 AAA 999666 BBB 4444 CCC Doit ... Consider above up to a few thousand rows. I want to convert it to below 3 column table ...
1
vote
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 ...
1
vote
1answer
23 views

Is there a way to automate folder optimization type in windows?

In windows 7 and 8, the downloads folder become optimized for pictures after a while, it causes the folder to lag when opened and even after changing that it returns to pictures every now and then. ...
-1
votes
0answers
12 views

Concert price finder? [closed]

I just finished writing a simple bash script that grabs concert dates from the web and gives me date and location next I would like to a script that takes a venu and fuzzes(I think that's the term) ...
1
vote
1answer
7k 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 ...
69
votes
15answers
20k 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 ...
3
votes
2answers
335 views

Restart-Computer and hold script

I'm running a Powershell script that requires a reboot in the middle of the script. After the reboot, the script is executing some commands (that can't be executed before the reboot!). I'm rebooting ...
0
votes
1answer
2k views

Rename a Mapped Network Drive via CMD

I map a network drive via command line. Once this drive is mapped, it appears under My Computer with the full path. How can I rename the mapped drive using command prompt? I have used the "full ...
1
vote
1answer
44 views

Win7 unlock & logout after x minutes

I have been asked to investigate some functionality for a number of shared PCs running Win7 on a local network. Basically people are logging on to the PCs and locking them in the morning and walking ...
-1
votes
1answer
31 views

Batch- file to move all files from one location to another in windows?

what I'm after is a batch file that will move all files from one folder to another, with the view eto schedule this as a task to run twice daily. I know the whole move command etc but appears to be ...
6
votes
5answers
17k 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 ...
0
votes
0answers
17 views

How can I disorganize multiple layers automatically? [closed]

I have an image that is 1000x1000px and have (with the use of a script) sliced it into small layer squares of 20x20px each. Every square fits within a raster of 20x20px. I want to: swap the ...
2
votes
1answer
22 views

Linux command/script to find all files in a directory with a 4 digit number <= a specific number

I have a folder containing several other folders, each named in this format: Company XYZ (1999 OneWordDescription) I'm trying to filter out the ones that are marked 1995 or older, so I can move ...
1
vote
1answer
307 views

Open browser window at specified screen / coordinates

A customer has a 6-screen setup for each workstation and would like various pages of a web app to be opened automatically in each of the screens on startup or invoking a shortcut. (The target web ...
1
vote
2answers
3k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
12
votes
7answers
24k views

Delete all files from a folder and its sub folders

I want to remove all files from a folder structure, so I'm left with an empty folder structure. Can this be achieved in either batch or VBScript scripting? I have tried a very basic batch command, ...
2
votes
3answers
41 views

How can I find what a Windows PC thinks its name is, given its IP?

How can I find out what a remote Windows PC thinks its host name is, given its IP? From Windows cmd.exe or a Linux shell. I'm not interested what a DNS server thinks the host name is for an IP, just ...
0
votes
1answer
5k 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
3k 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 ...
1
vote
1answer
51 views

Script - Lenovo Battery Recall

Problem: LenovoBattery.exe fails when called via batch file. Is there a way to make it work? Details: Lenovo has expanded its voluntary recall of notebook batteries. They request the industry to run ...
144
votes
18answers
73k 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 ...
0
votes
0answers
8 views

how to log dmidecode results using bash

I have been trying to write a bash script to log dmidecode results in the a log file. Till now, this is how far I got. #!/bin/bash for i in `seq 0 5`; do sudo su <<HERE dmidecode -t $i ...
0
votes
1answer
640 views

Remove all user folders except one on reboot

On a Mac, how can I create a script to automatically remove all user profile folders except a specific one on a reboot?
1
vote
1answer
17 views

Bash odd numbers

I wrote this bash script to print odd numbers, but the code is not working there is something wrong with the if statement. Could someone point out the mistake? for((c=0;c<100;c++)); do if ["$c" % ...
1
vote
2answers
53 views

Need to rename many very long file names with variable

My company gets a list of files every day that we need to process and the file names are almost impossible for our system to deal with. Is there a way to rename these files? I am new to any type of ...
1
vote
1answer
28 views

Script for finding out disk number

I have an external hard disk with two partitions. The first one is an UDF partition and the second partition is a Veracrypt partition. Now I want to use a batch script to load the Veracrypt partition ...
1
vote
1answer
36 views

Open browser window on dual monitors [duplicate]

My client has dual monitors which they use to display two different websites in a public space. They want to be able to hard reboot the system and have it automatically start two browser windows, one ...
0
votes
2answers
104 views

How can I delete half of the files in a directory?

A directory has files with names ending 001 to 100. How can you delete 2,4,6,8...100. And can that be written as a script. As soon as the directory becomes week old, this has to run. And after a month ...
2
votes
2answers
23 views

How to send rich text to the clipboard from command line?

How can I send html to the clipboard as rich text from a script? My end goal is create a script so I can paste content from a source file into an email, but I want a general answer for pasting into ...
0
votes
0answers
13 views

Chrome Keyboard Typing Sequence

I want to create a new shortcut that will run a keyboard script on the page. for example when I do alt-g it will do [tab]+ type-"hi"+ enter.
1
vote
1answer
28 views

Hiding internal work outputs by shell script

I make a shell script that can update a tools. I want that when i run the root@host:# sh script.sh then the output will be Its installing Its done But now my script look like root@host:# sh ...
1
vote
1answer
26 views

How to create a script that launches a random video file from the folder

So, this is a weird problem. But basically, my nephew likes watching cartoons on my computer sometimes. And that worked well. OVer time, his cartoon folder grew up. Here's the problem: he wants to ...
0
votes
1answer
18 views

What software can I use to invert txt list IP-ranges? (not a reverse DNS lookup)

This is a blocklist, but I want to have only IP in the list to be allowed. instead of: 1.2.3.5-1.2.10.20 2.2.3.5-3.2.100.20, i need: 0.0.0.0-1.2.3.4 1.2.10.21-2.2.3.4 3.2.100.21-255.255.255.255. ...
1
vote
1answer
58 views

Bash quotes unescaped on command substitution

Can someone explain me why this is working (listing the contents of a directory that has a whitespace in its name): ret="$(ls "my dir")" Shouldn't it rather be interpreted as: ret="$(ls " my dir ...
3
votes
1answer
3k views

Install a Teamviewer host silently with custom password

Our company has the custom Teamviewer hosts that we can run silently with the /S switch. The issue is that we can't connect due to it not setting a password that we know. Does anyone have any thoughts ...
15
votes
2answers
27k views

Linux Bash Script, Single Command But Multiple Lines?

I have the following script I wrote by searching Google, and it backs up my Linux system to an archive: #!/bin/bash # init DATE=$(date +20%y%m%d) tar -cvpzf ...
1
vote
1answer
49 views

Windows-8 how do I write a script to change the resolution?

I have a yoga 2 pro that comes with a high resolution display (2k I believe). This sometimes causes issues with programs not scaling properly which for the most part I can ignore. However I also ...
1
vote
2answers
60 views

Counting specific words within a batch of Word documents

I need a count of the number of times an acronym (e.g. ‘ABC’) is used in a collection of word documents. The acronym is always three letters and in block caps. All the word documents are contained ...
1
vote
2answers
976 views

How to remove blank lines in .txt files

I want to change a text file's format, removing all blank lines. How can I do that? (2) 5. The function of the condenser is to: a) vapourise the liquid refrigerant b) change ...
-1
votes
0answers
28 views

Using Robocopy to copy files in order, not alphabetically

Do you guys know of a Robocopy switch that will allow me to mirror my Links (Windows 7) in the order I have them on my main machine, to another machine? When I run Robocopy now, all the Links copy ...
4
votes
4answers
18k views

Script - How to check if a network path is available and then map it

I would like an screen saver / logon script that checks if a network path is available and then map it to a unit. If it is not available it disconnects/don't connect. Network path is ...
2
votes
3answers
2k views

How to test stability of wireless router

I had a wireless router that would intermittently drop connections, so I had switched to using a different router. I have since updated the firmware on the problematic router. Is there an easy way to ...
1
vote
2answers
1k views

How to extract the filename without the extension from a full path?

I'm trying to right my first bash script, and at one point a filename is passed to the script as $1. I need to extract the file name without the extension. Currently, I'm assuming that all extensions ...
0
votes
3answers
51 views

Have the command prompt launch an application like Notepad and block until it is closed

I have a Batch script I essentially want it to present the user with a notepad window opened with a configuration file for the user to edit each time they run the script, and I want the Command Prompt ...
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 ...