batch-file

Windows batch - concatenate multiple text files into one

馋奶兔 提交于 2020-01-12 02:41:45
问题 I need to create a script, which concatenates multiple text files into one. I know its simple to use type *.txt > merged.txt But the requirement is "concatenate files from same day into file day_YYYY-DD-MM.txt" I am linux user and windows batch is hell for me. EDIT: Its Windows XP 回答1: Windows type command works similarly to UNIX cat . Example 1: Merge with file names (This will merge file1.csv & file2.csv to create concat.csv) type file1.csv file2.csv > concat.csv Example 2: Merge files with

If greater than batch files

谁都会走 提交于 2020-01-11 17:09:47
问题 I wrote a simple batch file to run Frequently Used websites based on a number selection. Here's the code I have. I am trying to set it so if someone inputs a number 6 or greater it will go to :N but whenever I type 6 the batch file exits. I have tried if %input% > 6 goto :N but it just tells me I am going to Google. @echo off :Start2 cls goto Start :Start title Frequently Used Websites echo Please select a website from the list echo with the corresponding key echo ----------------------------

If greater than batch files

会有一股神秘感。 提交于 2020-01-11 17:08:09
问题 I wrote a simple batch file to run Frequently Used websites based on a number selection. Here's the code I have. I am trying to set it so if someone inputs a number 6 or greater it will go to :N but whenever I type 6 the batch file exits. I have tried if %input% > 6 goto :N but it just tells me I am going to Google. @echo off :Start2 cls goto Start :Start title Frequently Used Websites echo Please select a website from the list echo with the corresponding key echo ----------------------------

batch file to replace the input with * without external file [duplicate]

江枫思渺然 提交于 2020-01-11 14:38:52
问题 This question already has answers here : batch file to mask input with * without an external file (2 answers) Closed 5 years ago . i need batch file to mask the input with * without external file and i need the code to ((((be fast in write letters))))) and does not Calculates the distance with * ((((if there is code extract the external file from the batch file which make the external file make password with * and fast to write password add comment to see the code )))) FOR EXAMPLE: @echo off

TortoiseSVN command keeps open processes

三世轮回 提交于 2020-01-11 14:32:08
问题 I am using a scheduled task to run a .bat script which updates my SVN repositories. The scheduled task runs every hour. It still creating a new process of "TortoiseProc.exe", every time I run the script, until the are a lot of open processes and the CPU is at 99%. The script is running fine, but unfortunately the processes won't be closed automatically. This is how my .bat looks like: CD C:\Program Files\TortoiseSVN\bin\ START /wait TortoiseProc.exe /command:update /path:"D:\somePath"

Adding password masking to a script

荒凉一梦 提交于 2020-01-11 14:27:07
问题 For practice, I am writing a program to hide a folder. The program itself is working perfectly, but I want to mask my input with asterisks (*). I have found code that masks input as a standalone script, but I can't figure out a way to integrate the code into mine. Any help would be greatly appreciated. program code @echo off color 5F title Folder Locker by KBKOZLEV :SETPASS set "tipp=" set "password=" if exist "password.txt" ( set /p password=<password.txt attrib +h +s "password.txt" ) if

Close db2cmd prompt after command execution from a batch file

混江龙づ霸主 提交于 2020-01-11 14:12:30
问题 I am trying to close the db2cmd after executing a command. Goal is to get this file perfect before I schedule it with a task scheduler to run everyday at 2100 hours. The batch file starts execution of the command, the command gets executed but the prompt doesn't close. I have been through the below links but no combination is working. How to close the command line window after running a batch file? How to automatically close cmd window after batch file execution? Here is my short script start

how to get today's modified folders in a directory using batch file

前提是你 提交于 2020-01-11 13:48:28
问题 I have a folder " Projects " and it contains multiple folders for different projects in it, I want to back-up that folder which has some modifications today( it can be single project or can be more than one). set ProjectFolder=D:\Projects for %%o IN (%ProjectFolder%/*.*) DO ( echo %%o set Project1Folder=%%o xcopy "%Project1Folder%\*.*" "%NetworkFolder%\%Project1Folder%\backup_%CurrentDate%\" /s/h/e/k/f/c ) And how to pass foldername (modified project) to be be copied in a loop. Note :- trying

Reliable way to find JRE installation in Windows bat file to run java program

浪子不回头ぞ 提交于 2020-01-11 13:34:11
问题 When installing the latest JRE 7 on Windows, it no longer adds the command java to the system path. So just calling java --version in bat file fails in that case (despite that Java from java.com is installed). What's a reliable way to find the java command installation directory in a windows bat file? I've seen it in the following locations: C:\Program Files\Java\jre6\bin\java.exe C:\Program Files\Java\jre7\bin\java.exe C:\Program Files (x86)\Java\jre7\bin\java.exe Not tried JRE 8 yet. Note:

REG DELETE a value which contains quotes in it, inside a batch file?

血红的双手。 提交于 2020-01-11 13:31:30
问题 I am trying to delete some registry keys in a batch file I made. I found the following code on here and it works good until it hits the REG DELETE for /F "tokens=1,*" %%a in ('REG QUERY "%KEY%" ^| findstr /I /C:"%VALUE%"') do (REG DELETE %KEY% /v %%a) The value is located under [HK_CLASSES_ROOT\Installer\Assemblies\Global] As you can probably see, most the values here have quotes in them for example: ADODB,fileVersion="7.10.2346.0",version="7.0.3300.00",culture="neutral",publicKeyToken=