Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
2answers
20 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 PGPProcessPath=\\%~p1 SET EncryptFile=%PGPProcessPath%%FileName% SET ...
-1
votes
1answer
23 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
63 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
42 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
43 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
votes
0answers
21 views

Recursing through folders to find all files with timestamp greater than given date using a .bat

I'm very new to .bat scripting and struggling with this problem: I have a deeply nested file structure (many files and folders) and want to find all files with a time stamp greater than a date given ...
1
vote
2answers
46 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
39 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
32 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
56 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
71 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
53 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
52 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
67 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
60 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
85 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
36 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
51 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
36 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
21 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
79 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
57 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
29 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
30 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
73 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
31 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
16 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
36 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
41 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
14 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
27 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.
0
votes
1answer
48 views

How can I stop my browser from opening up itself and loading a page when internet is connected?

When I connect to the internet through a dongle (ISP: Tata Photon+/Tata Indicom) it opens up my default browser (google chrome) and logs on to the homepage of my ISP which is integrated by Yahoo!. I ...
0
votes
0answers
26 views

Windows Automated Installation. How can I change boot order in WinPE from a batch file?

Trying to complete automated install of windows OS. I have WinPe on a USB which is first in boot order. I have several batch files running automatically in WinPE making partitions etc. as part of the ...
3
votes
2answers
94 views

How can I make my computer do a repeated series of tasks by a script file on Windows?

When I want to update a web project of mine, I have to do the following tasks all the time: Open cmd.exe. cd into working directory of project. Run localhost command in cmd.exe (~ jekyll s). Launch ...
1
vote
2answers
40 views

Why is SET PATH= not working in the same batch file?

I have a USB flash drive with portable installs of Dropbox and emacs. One of the functions I want to run in emacs needs to have sha1sum.exe in the path, so I also put coreutils on the USB. I am ...
0
votes
1answer
57 views

Is there a way to see what an executed batch file did?

I'm pretty sure the answer to my question is a simple "No", but I'm going to try it anyways. (And a plain No would help me also.) We've got a shared computer. Folks may use it as they do, but they ...
-2
votes
1answer
93 views

How to download from a direct link using batch files and Google Chrome? [duplicate]

I want to create a batch file which is capable of downloading any files from direct links. I already tried this: chrome start ...
1
vote
1answer
93 views

A .bat file to close two services running in background

I have a Windows 7 computer with three accounts (in hierarchical order): Administrator (with password) type Administrator Guest (with a password different from that of Administrator) type ...
1
vote
1answer
55 views

How can I elevate my cmd prompt using the the cmd line

I follow this script "runas /profile /user:administrator\administrator cmd"and when it prompts me for my password it always says that it is incorrect even though i am spelling it correctly. help ...
0
votes
1answer
41 views

How do I make exclamation marks show using echo

Earlier today, I was continuing on making an RAR Password Decryptor. I was testing it out on a test RAR file with the password being just an exclamation mark but when I use my Decryptor all it says is ...
1
vote
2answers
43 views

Wildcard file extensions xcopy

I have some files that need to be copied to a directory on a schedule. All the files have the same name but the extension increments (I have no control over this, it drives me mad) I've tried ...
0
votes
1answer
59 views

Remove Icons from Desktop / Windows 7

New to the site so any advice would be helpful. I am on a computer where the network admin runs some script that continuously puts 2 icons on my desktop. I can delete them and then in a few minutes ...
2
votes
2answers
81 views

how to run bat file as administrator automatically from a non-admin account

My work account is a non-admin but I have the admin password. I need to run a .bat file as admin automatically when windows starts from my non-admin account. I couldn't figure out how to feed in the ...
1
vote
1answer
42 views

Batch file FOR command skipping lines

I need some help with the FOR command in batch filing. What I want to do is read the file "Test.txt" and read only the third line and turn it into a usable variable within this batch file. Here is ...
-2
votes
1answer
51 views

for /f %a in (Y:\el.txt) do move %a C:\Users\srinu\Desktop\test

I am run below cmds in commands prompt for Ex: for /f %a in (Y:\el.txt) do move %a C:\Users\srinu\Desktop\test after that i need result txt file Example:c:\skipped.txt (not moved File Numbers) how ...
1
vote
2answers
60 views

Batch File Pause

I was testing out a batch file and I put in pauses to double check that the script was functioning properly. My question is, if the script encounters a pause, and I alter the script, either add a ...
1
vote
2answers
66 views

Extract Specific Fields from a Multi-Lined Text File via batch-file (.BAT)

I am new to batch-program and my wife asked me to help her to speed up her load. Question is, how will I extract the business date, terminal num(00099106), transaction amount, and commission from this ...
3
votes
2answers
100 views

Command Line : Concatenate multiple files by date

I have got a plenty of .txt files in a directory. The directory also contains .png and some .pdf files. I have successfully concatenated .txt files using this command : @ECHO Off SETLOCAL for /r %%f ...
1
vote
1answer
48 views

Windows Batch to read TXT and parse lines to CSV

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...
1
vote
1answer
40 views

Windows Batch to read TXT and parse lines into JSON

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...