batch-file

Is there any way to create an shortcut desktop to a Node.js (npm) application?

那年仲夏 提交于 2020-01-14 13:25:26
问题 Inexperienced users want to "see" the app that I've created in Node.js, but they don't want to use the console. According to them, it's a good idea to install it, and with a simple click, in desktop, they could "see" it. They want to run the Node.js app as a Windows program. That's all! How can I do it? Should I create a batch file? 回答1: **SOLVED** An .bat file, renamed as "appstart.bat" cd C:\Users\MyUser\MyApp npm start With shortcut in desktop. 回答2: The bat file should look like the below

How to run a specific version of Java with a program?

Deadly 提交于 2020-01-14 10:15:07
问题 So I have the latest version of JRE 7 on my computer, and everything is working fine. Lately, I've downloaded a program that requires JRE 6. I know where all of the files are located on my computer, all I'm asking is the .bat file code to run a specific version of Java with only that program. I am somewhat of a newbie when it comes to Windows and Java PATH structure, so Stanford's computer science course has you use a modified version of Eclipse to code in Java, and it was created when Java

Changing white-space on the beginning of a file name [closed]

感情迁移 提交于 2020-01-14 07:11:52
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . We have randomly named pdf documents being uploaded to a Google Drive folder. When uploading these documents sometimes there is a space in front of the file name, ex. " 12345.pdf" . I want to delete this whitespace in front of the file name with a batch file. 回答1: If the number of leading spaces is

Get content of xml tags with batch file (UPDATED:Getting also tags attributes)

与世无争的帅哥 提交于 2020-01-14 06:52:10
问题 I have the following "file.xml": <root> <cities> <cityName>paris</cityName> <cityName>london</cityName> <cityName>...</cityName> ... </cities> <countries> <countryName>india</countryName> <countryName>japon</countryName> <countryName>...</countryName> ... </countries> <continents> <continentName type="geo">asia</continentName> <continentName type="geo">america</continentName> <continentName type"geo">...</continentName> ... </continents> </root> I would like to get with a batch file all the

How to delete *.bak files recursively older than a specific date depending on directory in file path?

情到浓时终转凉″ 提交于 2020-01-14 06:48:06
问题 I'm writing a batch file for Windows 7. I currently have a code that deletes old backups from our masters folders within our site management folders. This is the code: for /d %%A in ("Y:\*.*") do del /s /q /f "%%A\masters\*.bak" However I need to code it to only delete things that are older than 3 years, which would be this code: forfiles /P "Y:\" /S /D -1096 /M *.bak /C "cmd /C del @path" However I need what is in the top code so that I can delete all *.bak files from the masters folders

batch file open windows and resize them

一世执手 提交于 2020-01-14 05:52:44
问题 I am currently trying to open two windows through a batch file and then resize and move them (to be splitscreen). Opening the separate windows is easy: @echo off cd "C:\Program Files (x86)\Internet Explorer" start iexplore.exe cd "C:\Program Files (x86)\Mozilla Firefox" start firefox.exe exit but I can't find a way to resize and move the windows I am opening. I would prefer not having to use any third party programs. I tried looking through the start /? help menu and don't believe any of the

batch file open windows and resize them

≡放荡痞女 提交于 2020-01-14 05:52:07
问题 I am currently trying to open two windows through a batch file and then resize and move them (to be splitscreen). Opening the separate windows is easy: @echo off cd "C:\Program Files (x86)\Internet Explorer" start iexplore.exe cd "C:\Program Files (x86)\Mozilla Firefox" start firefox.exe exit but I can't find a way to resize and move the windows I am opening. I would prefer not having to use any third party programs. I tried looking through the start /? help menu and don't believe any of the

merge multiple text files, removing all headers and the new header will be changed as follows:

我只是一个虾纸丫 提交于 2020-01-14 05:49:07
问题 Assuming we have this text files *0000000000003000345800091600000000000002082019 0 *000000000000322322930002160000000DOU JIJEL 1 *000000000000306156240007000000000TIC TAHER 1 The header contains always what follows : From position 1 to position 21 we have always this: *00000000000030003458 which is an « unchangeable » value. It contains 21 characters. From position 22 to 34, we got 13 characters which represent the sum of the amounts contained in every line the text file from position 22 to

find path of latest file using batch command

若如初见. 提交于 2020-01-14 05:46:06
问题 I have files named file.txt in multiple subfolders in my folder. I want to get the path of the latest file.txt FOR /r %%i IN ('DIR file.txt /B /O:-D') DO SET a=%%i echo Most recent subfolder: %a% gives latest created folder having file.txt whereas I want the folder which has latest file.txt 回答1: @echo off setlocal enableextensions disabledelayedexpansion for /f "tokens=1,2,*" %%a in (' robocopy . . file.txt /l /nocopy /is /s /nc /ns /ts /ndl /njh /njs ^| sort /r 2^> nul ^| cmd /v /q /c "set

Open SSH tunnel via Plink and run R Scripts via command line batch file

♀尐吖头ヾ 提交于 2020-01-14 05:11:11
问题 I am trying to open an SSH tunnel via Plink in the command line to run a few R scripts and I cannot get the R scripts to run and when they do run the tunnel was not created, so the connection to my database crashes. The Plink code looks like this: plink.exe -ssh [username]@[hostname] -L 3307:127.0.0.1:3306 -i "[SSH key]" -N Followed by the code to run the R scripts "C:\Program Files\R\R-3.2.1\bin\x64\R.exe" CMD BATCH qidash.R I cannot seem to get the tunnel to stay open to run the R script.