Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
2answers
23 views

Dos script works fine on one machine and not on others, why?

Being not so good in dos-script but have good use for it, I did find here many easy solutions for issues I encounter. So recently I copied a script form here to count the number of files in ...
1
vote
3answers
41 views

Running a Python script from the “Run” prompt

I thought this would be easy, but I've been struggling for a while. I have a Python script on my Windows machine called "myscript.py". I have it in a folder that's on my PATH, and I've added the ...
-2
votes
0answers
48 views

*.bat script : find in “xxx” folder today files that containing “yyy” string inside and copy thoes files to “zzz” folder [on hold]

Please script in batch : find in "xxx" folder a today files that containing "yyy" string inside of them and then copy those files to "zzz" folder i guess it can be done with forfiles and findstr ...
0
votes
0answers
21 views

How to batch print SWF files to PDF?

I am using windows 7 X64. I have installed Adobe Acrobat, so that I have a virtual PDF printer. I have also install the adobe flash player on the system. I open the SWF file using the flash player, ...
0
votes
2answers
41 views

Any problems from copying system32 into syswow64?

I ran a .bat file as an administrator. The .bat file said to copy all .dll files from the current directory to the syswow64 directory. Something like: copy *.dll c:\windows\syswow64 Unfortunately, ...
0
votes
0answers
10 views

open excel using .bat when excel error “file in use” is returned

I have created a .bat file to open Excel, then my Excel workbook which contains a macro which runs on open, all on a scheduled task timer. The problem is that occasionally the Excel files are not ...
1
vote
1answer
22 views

Batch file merge two text files

I have two text files and I need to merge them like this: text file 1 [][][] [][][] text file 2 ****** ****** ****** output ****** [][][] ****** [][][] ****** I have already looked ...
1
vote
2answers
27 views

check to see if service is fully stopped before trying to start service

I am trying to make sure the batch file knows the service "Tomcat7" is fully stopped before trying to start the "Tomcat7" service again. I know "NET STOP" and "NET START" are supposed to wait to ...
0
votes
0answers
35 views

Batch file or script to telnet to multiple hosts, log initial output then close and test next host

I have a large list of IP addresses from a database that I need to sanitize and determine which type of host (it'll be one of 2 device types) each IP address relates to. Is there a way of using a ...
0
votes
1answer
17 views

How to delete the profile AD attribute using dsmod or similar?

As part of a user management batch script, I need to delete the profile value from an AD User object. The syntax I'm using is as follows: dsquery user -name TEST | dsmod user -profile "" It ...
0
votes
2answers
32 views

Batch check for *.reg but only if = 1 file

I am looking to basically check if a batch file is present by wildcard *.reg, but I would like it to error if there is more than 1 .reg file. This is the code I have been trying to use, but my batch ...
-1
votes
1answer
43 views

Windows CLI alternative to robocopy and xcopy

I am looking for windows console-based tools similar to xcopy or robocopy. I have to send file into writable but not readable net share directory (unix privileges 333). Both tools are great however I ...
0
votes
1answer
29 views

How can I use a batch file to create multiple registry backups in the same folder? [closed]

I have a batch file in the Startup folder that creates a backup of the Windows registry using regedit. The problem is that it overwrites the older .REG file every time the computer restarts. Here's ...
-1
votes
1answer
30 views

Renaming files with batch [duplicate]

Is it possible to write a .bat-file that changes the names of all the files in a folder? For example: if I have a bunch of jpegs in a folder that have random names: File1.jpg ScreendumpA2.jpg ...
1
vote
0answers
23 views

How can i track client isolation?

My wireless Router client isolation is enabled.Now how can i know that WiFi client is isolated without longing inside the router? Is there any script or command what i run in any local pc and that ...
2
votes
1answer
32 views

Win7 scheduled task ignoring net use saved credentials

On Win7 64 Pro, I have a batch file that runs net use to map a network share from my server over OpenVPN. The batch file doesn't have the username or password stored in it, it uses the user ...
1
vote
1answer
35 views

Windows 7 bat specific network interface for user

I have two network connections and what I need to be able to do is when a specific user logs in to either disable an interface or force use of a specific interface which ever is easiest. I can ...
2
votes
1answer
23 views

If then statement in the for loop

I'm nebiew for windows scripting. My scripts would seachs string in the file, if counted the string and checking return code in if then else statment. But, I have question, some error on if then ...
-2
votes
1answer
30 views

Windows Scripting: If statement, comparison of two variables is not working

I have this part of the code which is running weird: if !NoOfLines!==!trailer! ( echo Count of records in DFUView interface verified ok. >> %LOG_DIR%\%SCRIPT_NAME%.log ) else ( echo ...
0
votes
1answer
29 views

Windows batch file “was unexpected this time”.

@echo off pause set /a x=1 set /a n=0 set /p x_end=x (End)= :loop cls set /a n=n+1 set /a x=x+n+1 set /a students=n+2 echo x=%x%, n=%n%, x (End)=%x_end% if (%x%=%x_end% goto end) goto loop :end echo ...
0
votes
3answers
46 views

How to access folder path from first input parameter and how to call IF Loop in batch file?

@Echo OFF SET FilePath=%1 SET HeaderFilePath=%2 SET RetrunCode="0" Call :sub %FilePath% exit /b :sub SET FileName=%~n1 SET FilePath=%1 SET "FileType=.zip" CALL SET ...
-1
votes
1answer
62 views

cmd to loop through a directory and remove special characters from file names

I'm looking for a command line script that can loop through all the files in a desired directory and replace any special characters in the file names with spaces. I'm stuck on the replace logic for ...
0
votes
2answers
80 views

.bat file random open file for 1-5 file in folder

I need a script to run in a window to monitor my folder. When I put a jpg file in this folder, then the script running in the window should open that jpg file with photoshop droplet (.exe), wait for ...
0
votes
4answers
53 views

Pinging using a variable

I'm trying to create a batch file that will ping a variable that is determined by the users input e.g. "Enter PC Name:" pc name =123 Then it pings 123.domain.com @echo off set /p UserInputPath = ...
0
votes
1answer
60 views

Windows 7 startup batch file hidden [duplicate]

I followed a guide to create a batch file so I can delay a program from starting up for a few seconds. (I didn't want to use a 3rd party tool) The thing is I don't want to see that cmd window for X ...
1
vote
2answers
71 views

BAT file to extract folder name from a file name & move the file into that folder

I'm not very familiar with windows bat file programming and I would appreciate any help with this. I need a bat file to do the following: extract folder name from a filename - eg, extract Chemistry ...
0
votes
1answer
90 views

How to run batch file command line argument on another server?

I have Encrypt.bat on \\RDWAPPserver which contains code to encrypt the file and upload it to FTP server by using 2 commandline parameters. Encrypt.bat needs 2 commandline parameters exl: ...
1
vote
1answer
56 views

How to adjust volume using batch files

I want to know how to set volume with cmd but can't download software. I know it is possible because I had it but deleted it. opps
0
votes
1answer
73 views

How to show a comfirmation dialog when a batch file window is closed

When users click the close (X) button of a batch file window, I want it to show a confirmation dialog asking "Are you sure want to close this batch file?" with Yes/No options. How can I do this?
0
votes
2answers
135 views

I can't run .bat and .cmd files with start command (Windows 7)

I can run .bat and .cmd files typing his names in windows console, but if I run with start "" file.bat I get this error: System can't run specified program. I have tested with a very simple file ...
-2
votes
2answers
90 views

How do i hide Windows batch file or hide the password in this text?

I have a code that I save into a text file and label it locker.bat, and it will hide a folder for me. But the problem is I can just right click and click edit and find the password (like down below ...
1
vote
2answers
71 views

Can I copy multiple files from single folder to multiple folder in windows with batch file?

I have a folder(D:office) with 10 pdf files (files name are random). I want to copy each of them serially in new 10 folders(D\alpha\a.... D\alpha\j). is it possible? Edit: I am sorry for poor ...
1
vote
1answer
228 views

How to upload file in FTP server using batch script?

I have created batch file called FTP_automation.bat which contains code below SET MyPath=E\PGP\test_pg ftp open 142.245.30.165 21 TESTA9MS test11 binary put %MyPath% quit Pause The thing is when I ...
1
vote
1answer
87 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 ...
1
vote
2answers
99 views

Copy all files from a list of folder locations

I have a list of folder locations from which I would like to copy all the contained files at these locations. The list of folder locations are stored on a seperate line within a text file (.txt). All ...
2
votes
1answer
51 views

How to pass parameters in batch file and zip the file using 7z.exe?

I need to create a batch file as per below requirements 1) pass path1 & path2 while running the batch file exl: testrun.bat E:\ERP\test1.txt E:\ERP\header.txt 2) Need to store these command ...
0
votes
1answer
55 views

TOUCH a batch file from itself

I'd like a batch file to touch itself to an arbitrary date/time. I've tried... touch.exe -xamq -t 201010201020 -- batch.cmd start /b "" cmd.exe /c "touch.exe -xamq -t 201010201020 -- batch.cmd" ...
0
votes
2answers
43 views

How to write to a batch file to tell it to write to another batch file

How to write to a batch file a command which itself writes to another file. Basically what I'm trying to achieve is this File1.bat echo abc >> op.txt File2.bat echo abc >> op.txt ...
0
votes
0answers
25 views

Robocopy won't work with Task Sheduler in Win7

I need to copy file from server to local disk cca every 5 minutes. Created batch file work fine but from Task scheduler it does nothing. The Batch file looks like this: ...
0
votes
1answer
142 views

Double Clicking Batch File Windows cannot find file

I've found variants of this question being asked all over the place, and I've attempted all of the actual answer I've found out there (including changing the registry for associations). The basic ...
0
votes
2answers
91 views

VBScript output: formatting to a column (data can vary in length)

I would like to have a batch file that will query for a list of services (DisplayName,State,StartMode), but have them output into a nicely formatted when looking at it in a txt file. Here's what I ...
0
votes
0answers
44 views

Running Batch files when a Pop up message appears from another app

I need to run a batch file when ever a particular Pop up message occurs. Basically I have a batch files, but I cannot directly call it from my application. but I can create a Pop up message from my ...
1
vote
1answer
34 views

IF statement in batch file not working properly

@ECHO OFF PAUSE IF EXIST "C:\Program Files\NexphaseV6\ECF" ( ECHO Directory exists! PAUSE ) ELSE ( MKDIR "C:\Program Files\NexphaseV6\ECF" ECHO Directory made! ) PAUSE When I run ...
0
votes
1answer
162 views

Delete all files in the folder except one extension(say .idf) using batch file [duplicate]

My current code to delete all files in a folder older then 2 days is : forfiles /p "C:\Test" /s /m *.* /c "cmd /c Del /F /Q @path" /d 2 There is one .idf file among all other files. I want to ...
0
votes
1answer
35 views

Run .sh in cygwin script from cmd

I have a .bat script that calls some .exe to generate text files: generate.bat: ... ResGen main.txt Main.resources /str:c# ... After that, I want to use vim's commandline search/replace on the ...
0
votes
1answer
22 views

NET USE remove if no right

I have a .bat for connecting network drives. I have 11 in total. My script works, but for now even if the user has no rights, that it connect the network drive. I would like if the user does not have ...
1
vote
1answer
50 views

Windows 7 cmd batch check installed application

This may sound like a simple question, but I'd be grateful for a quick solution: I have a batch script which runs at logon (with elevated privileges) that should run only if a specific program ...
1
vote
1answer
67 views

How can I edit local Group Policy settings using command line?

I'm attempting to throw together a script for work that allows BitLocker without a compatible TPM. The setting is "Configuration \ Administrative Templates \ Windows Components \ Bit Locker Drive ...
0
votes
1answer
17 views

pushd with rd dont work as I want

have done like this pushd \\somedrive.se\Install\Paket\XXX\ echo "start..." for /f %i in ('dir /a:d /b bu* ') do echo /q %i popd and get this output when running from a script: ...
-3
votes
3answers
33 views

Batch Files make Directory within Directory

How would you create a directory inside of a directory in batch files? I've tried various times and I couldn't get it to work. Please help.