Questions tagged [batch]

A batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter under MS-DOS and Microsoft Windows.

This was the first extension used by Microsoft for batch files. This extension runs with MS-DOS and all versions of Windows, under COMMAND.COM or cmd.exe, which execute its commands, normally line-by-line.

339 questions
0
votes
0 answers

BAT script to return server licenses at shutdown?

My office uses program licenses that have to be manually activated and returned, and people tend to forget to do this when they go home for the day, resulting in most licenses tending to be unavailible for anyone coming in early next morning and…
-1
votes
1 answer

For Loop in cmd and powershell - 1 is unexpected at this time

I need to run a for loop, from powershell, in cmd... aka, at the PS Prompt: cmd /c For /L %i in (1,1,5) DO (Echo %i) But, I get a "1 is unexpected at this time" Other responses in my research indicate "%i" is command line, and "%%i" is script/batch…
Jeff
  • 1
  • 1
  • 1
-1
votes
1 answer

Batch File if process is running kill task

I need to run this batch file remotely through PDQ deploy here is the batch file: @echo off taskkill /f /im wccad.exe >nul taskkill /f /im ACSR.exe >nul cd C:\csg\wccad\ wccad.exe -run ACSR WIN_32 timeout 600 >nul taskkill /f /im ACSR.exe >nul Here…
-1
votes
1 answer

How to get a specific program from the task manager

i want to get the process that is running with the GDI Object 157 using batch script command but not able to do so my script is tasklist /fi "gdiobject eq 157"
Akash
  • 1
-1
votes
2 answers

How to create a batch file which after some time execute a file but if interrupted execute another?

I want to automate my ms office installation 2007 or 2010 running a batch file. I am thinking having an options menu 1.Office 2007 2.Office2010 When started I want my timer to start..lets say 20secs if I press in the meantime Option 2 start…
-1
votes
2 answers

create folder from a list

i need to create a personal folder for each user of my company. I've tried to create a batch script using ND command and it works just with name folder without . (dot) The name of each folder should be name.surname ND jonny.green, …
-1
votes
1 answer

robocopy cannot find path

i have batch script like bellow: SET SOURCE=F:\Diff\For_VOYAGE\models.pck.files\models\players SET DESTINATION=F:\Diff\For_VOYAGE\models.pck.files\NEW\models\players SET LOG=LOG.txt robocopy %SOURCE%\装备\女\印度舞娘时装上衣 %DESTINATION%\装备\女\印度舞娘时装上衣 /E…
hrace009
  • 1
  • 3
-1
votes
1 answer

Script/Batch If Directory is a certain age then run .exe

I currently have a batch file that looks to see if a folder exists and then if it does it runs the uninstall exe within it and then installs the program with an msi. I need to alter it or just convert it to powershell so that it first checks the age…
Thomas
  • 3
  • 1
-1
votes
1 answer

Delete files by date and character count

I have an interesting problem. I need to delete directories that are older than x days but are only numerical. We have a log folder that has log files that we need to delete but other files and folders are also stored in the same locatin.. Normally…
michael B
  • 1
  • 1
-1
votes
1 answer

Best Practices for User folder permissions

The following is my bat file. Is there a way I can substitute First.Last with usernames from a CSV file? My boss doesn't want to do all the users at once. He's afraid that something may happen so he's handpicking 10-20 people every night. echo Y |…
-1
votes
1 answer

Space in batch commands (del and taskkill)

I have a problem using del and taskkill. del D:\New Folder.exe I tried changing the code to this: del D:\"New Folder.exe" That didn't work So I tried this: del "D:\New Folder.exe" Still not working. But this is working: del "D:\New Folder" The…
hunter
  • 3
  • 2
-1
votes
1 answer

portqry to check connectivity

Is it possible to check the connectivity between 2 remote servers using portqry given that the portqry.exe command is executed on another server. for example, check the connectivity between serverA and serverB where the portqry.exe command is…
-1
votes
2 answers

add space to batch file

How my bath file can process space in path example: C:\Documents and Settings\K\Desktop\New Folder @echo off pushd "%~dp0" IF EXIST "%1" GOTO DECODE_INDIVIDUAL :DECODE_MULTIPLE xcopy /s /c /d /e /h /i /r /y "%cd%\encoded" "%cd%\decoded\" dir…
-1
votes
1 answer

Automatic backup from SSH-server

I am in needed of a script (. Bat) who log on to an SSH server, and perform a backup of my mysql database with the help of mysqldump. This is to be run on a Windows computer and run three times per day. I do not really know where I should start, but…
Tordbob
  • 7
  • 1
-1
votes
1 answer

How to do a Batch file that get all files in a directory and zip it?

i would like to know how to get all single .bak (or anyother extension) files into a directory, and zipping them (one by one) and save them using the same name, changing only extension. Thanks
stighy
  • 931
  • 8
  • 21
  • 32
1 2 3
22
23