2
votes
1answer
7 views

How to project all the files or newest files that were added to the directory using gdalwarp and commandline(.bat file)

How am I going to automatically detect all the files that were added to the directory and then project it immediately?Because everyday I am downloading hdf files and then project it from time to time ...
0
votes
4answers
44 views

Ways to start a program at the same time as cmd

I'm in a bit of a quandary: when I want to start a program at the same time as another program, my normal MO is to make a batch file that goes something like this: @ echo off start exe1.exe start ...
4
votes
2answers
45 views

Replacing certain word in text file using Batch file

I am trying to use a batch file to determine the currently installed drive letter and to replace a keyword in the ini file with the drive letter. Basically the ini file contains: [app] ...
-1
votes
3answers
53 views

Windows Batch File to copy and count file names and output to single file

I have a folder with multiple files containing records. I want a windows batch script which will copy all the 'file names' into a single output file along with the count of records that are present ...
0
votes
1answer
37 views

Windows Batch File - delete data after a delimiter

I have seen several examples of what I need, and have tried modifying those without success. Starting information: a:b:c:d:e:f Desired Format: a:b Information will be pasted in 1 text file ...
0
votes
2answers
34 views

Batch grab all font files

I'm not too great at Batch but I am fairly sure it can do this despite not seeing any other questions/pages on this. My Issue: I have a series of font files (.otf and .ttf) within a folder. Some are ...
0
votes
0answers
24 views

A way to save all the names of active windows and tray icons periodically

As title says, I've already checked this post: Is there a way to copy the file paths of ALL active windows' opened files? (for saving and restoring your Windows session across a restart) And I ...
0
votes
2answers
39 views

Windows pausing service instead of restarting it when batch file called from task scheduler

I have set up a task in Windows Task Scheduler to run at a specific time each day. The task simply executes a batch file I've created to restart my Windows service. This is the contents of that ...
2
votes
2answers
73 views

Batch File to start .exe when a specific number of files is in monitored folder

I am trying to write a batch file that will trigger an exe whenever there are exactly 4 jpg images in a folder. Afterwards the images should be deleted. I have got it to work it seems, but the file ...
0
votes
0answers
33 views

how can I remote shutdown after host pc shuts down?

I have windows 7 Pro and for the project I'm doing I need the remote PC to automatically shutdown when the host shutdown. So say if I power down computer a I would need computer b to shut down within ...
0
votes
3answers
44 views

Windows 7 script to change part of a file name

I have a collection of files whose names are in the form car-#######-NNNNNNN.xxx, where ####### is a series of numbers that need to be kept as part of the file name, and xxx is an extension denoting ...
0
votes
0answers
15 views

Windows 7 mountvol and task scheduler

In Windows 7, I have a Task-Scheduler job which run Backup4All, to do a backup of my data. It has provision to run a "pre"-backup batch file, and a "post"-backup batch file, which I have taken ...
0
votes
1answer
99 views

Windows Batch - Move files to folder parent & Remove empty subfolders

I found several such questions and tried to adapt the answers to my needs but no luck so far. Im trying to create two context menu entries in Windows 7 that would: Move all files from ...
0
votes
0answers
145 views

What's the equivalent of Wevtutil in XP or 2003?

I have a batch file for saving event logs to our shared drive. I want to do this for XP and Server 2003 without very much effort. What could I use since Wevtutil is only on Vista and up? rem Script ...
1
vote
3answers
67 views

WIndows 7 command line input

I have a drivers folder on my file server. I am writing a command line script that will prompt the user to enter a computer model number. the script will then use that input to copy over the correct ...
1
vote
0answers
47 views

Applications and .bat script get locked in Windows 7 for some minutes

I am playing around with Windows batch scripts and simple C++ applications on a Windows7 64Bit PC. The problem I am facing is that I cannot modify neither the batchfile nor the mingw-exe for minutes ...
1
vote
3answers
85 views

Processing files with names that contain a “^” (Carat), inWindows

I'm having trouble processing files with names that contain a "^" (Carat). What I'm noticing is that if I use double quotes when evaluating the filenames, the "Carat's" are doubled. If I don't use ...
0
votes
0answers
85 views

Special Characters in Folder Names Cause Delete by Batch File to Fail

I'm trying to delete empty folders via a batch file, in Windows. for /f "usebackq delims=" %%d in ("dir V:\Temp /ad/b/s | sort /R") do rd "%%d" fails on folders with special characters - ...
0
votes
0answers
603 views

windows 7 batch file change desktop background

i want to write a batch file that changes the desktop background this is what i have reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d c:\j2Global\backgroundDefault.jpg reg ...
0
votes
3answers
88 views

windows command prompt change directory is now changing directory

I am trying to change directory from C drive to E drive. but the its not happening through following code. C:\>cd E:\Program files\wkhtmltopdf C:\>echo %cd% C:\ It says C:\ is current ...
0
votes
1answer
52 views

.bat file to create a Library with icon in Windows 7 and 8

Is it possible to create a .bat file that creates a Library with an icon in Windows 7 and 8. Of course this can be done by following the already created tutorials online like Change Your Windows 7 ...
0
votes
0answers
86 views

Batch file with (Java invocation) wildcard expansion works on one Win 7 machine, fails on another

I'm using a Windows batch file to launch a Java program, using wildcard expansion to set a load of JAR files on the classpath similar to the below: java -cp "MyLibFolder\*" com.stupid.StupidProgram ...
0
votes
1answer
28 views

Could someone explain me the concecpt of “Recursion” in the context of the FORFILE Command (batch)

i'm having some trouble to understand the concept of recursion while reading the explanation for the FORFILE command. for the parameter /s it says in the reference: /s: Instructs the forfiles ...
0
votes
2answers
666 views

Using FORFILES to delete Folders older than 2 days

here is what i'm trying to do: Use the forfiles Command in a .cmd script to delete folders from a specified path that are older than e. g. 2 days on a win7 machine. Edit: The Situation is the ...
0
votes
0answers
20 views

“Print all” option causes unwanted cropping of .tiff files

I am printing multiple attachments using the "print all" option and .TIFF files are not printing fully, the edges are cut off. How do I prevent the "print all" option from doing this?
0
votes
0answers
147 views

Windows Login Script ignore UAC

I have a GPO that will launch a Startup Script for a .exe(Install Shield) silent unattended setup. However the user is currently being prompted to allow program due to UAC. I want a true unattended ...
1
vote
0answers
126 views

How do i add command to my batch file to go get a screen shot of a webpage and return and save to my desktop?

I'm just learning about batch files and such, and I have been googling round and round trying to find how to create a batch file with a command that will go to my youtube page link and take a ...
0
votes
3answers
112 views

Batch Renaming files (and possibly switching parts of the name)

I am organizing 60,000+ images, and need to edit down their names. I would love to just do a batch rename, as this would likely take 60+ hours otherwise. The names are similar to what follows: ...
0
votes
1answer
666 views

7z in batch file with variables “Incorrect command line”

I'm trying to run the following batch file: set HH=%time:~0,2% set HH=%HH: =0% IF %time:~0,2% GTR 5 ( IF %time:~0,2% LSS 21 ( FOR /F "TOKENS=1 DELIMS=:" %%A IN ('TIME/T') DO SET HH=%%A XCOPY ...
0
votes
0answers
62 views

How to make Batch file to give a message when exiting?

Code: @echo off start /wait /b echo hi > message.txt pause exit When you click the batch and type exit, you the message saved. My problem is, if you exit by click " X " button, then no message ...
0
votes
1answer
94 views

Window Batch file - Current folder name gets truncated

On my Win7 x64 box, when I run this command to find the current folder name for %* in (.) do echo %~n* it works for folders with alpha characters. However, for folder names that contain numeric ...
0
votes
0answers
113 views

Domain batch script won't map network drives

I have a user who's workstation has started refusing to map the network drives. We are on a Server 2k3 domain and use batch files to map network drives. The user's workstation is Windows 7 Pro. ...
1
vote
1answer
47 views

How can I recursively identify non-searchable PDFs and copy them to a folder?

Further to an earlier post which provided a script solution: From my question it may be possible to tell that I am a computer user and have no programming knowledge. I have hundreds of searchable ...
1
vote
1answer
344 views

Change registry permission of 3 keys does not work with regini

I'm preparing a batch script that should help me to remove 3 keys from the registry. Unfortunately nobody has permission to edit the keys, except for TrustedInstaller. To execute my reg file that ...
1
vote
1answer
3k views

Batch File, PING, errorlevel and > null what do they do?

This seems like a really easy question (running Windows 7). But I have looked for the answer and couldn't find anything at Microsoft's sites (XP PING & Everything else PING) or from a bunch of ...
2
votes
1answer
1k views

Robocopy copy only changed files to new folder

I'd like to create a backup such as the following: C:/backups/20140101/ All files from source folder C:/backups/20140102/ Only files changed since last backup C:/backups/20140103/ Only files ...
0
votes
1answer
99 views

robocopy using parent folder name

I have a small batch file that uses robocopy to backup a folder. The intended action is for it to copy C:/users/public/ into D:/Backups/YYYY-MM-DDTHHMM/ At present, it copies the files into a folder, ...
0
votes
0answers
366 views

Batch file - Copying folders with percentage

I'm currently trying to create a batch file, which actually copy a folder from a server to a clients machine. And I'm playing around with batch file, using xcopy, and it gives me the percentage of ...
0
votes
1answer
62 views

How to access cmd of another computer from my computer's cmd?

How can I access the Command Prompt of another computer from my own computer's Command Prompt in Windows7? I am hoping that I can do something like that into a batch file: Enter \\ComputerA -u John ...
0
votes
1answer
241 views

How do I write a batch script that iterates through all png files in all subfolders and does an action?

I'm looking to build a small batch script that executes the command line of pngout.exe So far I've got only this down for %i in (*.png) do "g:\myfiles\_pngout.exe" "%i" /s0 /c6 However, for that ...
1
vote
1answer
50 views

How to pass CLIs in a remote linux server from windows batch script?

I am able to connect to a remote linux server by using start C:\Users\pankmish\Downloads\putty.exe -ssh stag -l username -pw password But Now i am trying to give linux CLIs from same batch ...
0
votes
0answers
51 views

Batch Script related issue

I have written following script which works absolutely fine on my system. @echo off setlocal enabledelayedexpansion FOR /F %%i IN ('wmic /node:%1 computersystem get Name') DO SET A=%%i FOR /F %%i ...
0
votes
1answer
82 views

I'm trying to run a batch file that test for 4 different files then based on the correct file present it runs the correct command

:: batch file to run backup @echo off setlocal set backup1=="F:\my backups\Disk_1_DataBAckup" set backup2== "F:\My backups\2_backup_data_to_disk2" set backup3=="G:\my backups\3_backup_data_to_disk3" ...
1
vote
4answers
1k views

How to read values in a particular column of a CSV file in Batch?

I am planning to write a batch script wherein I need to scan the values from a particular column of a CSV file one by one and store them in a variable for further processing. Say, following is the ...
0
votes
4answers
115 views

Batch Script to find out whether a host is up or down

I need to scan several systems in the network within IP range 172.18.x.x to 172.25.x.x and check whether each of them is active or not, and then dump the result in a file. Following is the script: ...
1
vote
0answers
174 views

Nested environment variable does not expanded

I can't explain the below strange issue. I have two system variables: PYTHONHOME = D:\Tools\ISDC_Tools\Scripting\Python.2.7 PYTHONPATH = %PYTHONHOME%;%PYTHONHOME%\Lib After creating a new cmd ...
0
votes
2answers
611 views

Changing Windows 7 Desktop Background

i've been searching online for a batch solution to change the desktop background of Windows 7 Ultimate 64 bits, and after several attempts, i could only get it to work once but never again... I'm ...
3
votes
2answers
2k views

run .hta as adminstrator

Simple question how do you run a .hta file as an admin? When I try running runas /user:Grants-laptop\administrator computerinfo.htafrom command line I get this error: RUNAS ERROR: Unable to run - ...
-2
votes
1answer
65 views

Batch file test for path + file name with extension

Batch file in Windows 7. I want to know how to test for a path + file name with an extension, if it exists or not. I have tried if exists "myfile.ext" It seems not to see the file. Your ...
0
votes
3answers
215 views

Get administrative right in windows command line [duplicate]

I am not trying to do cheeky things, but my need is just to have two scripts for adding or removing IP routes using the following command in batch scripts: Add route: @echo off route add -p ...