command-prompt

Sending raw data/printer commands to Printer

女生的网名这么多〃 提交于 2019-12-12 02:26:52
问题 I understand that is possibly/slightly off topic here, but it is to do with programming a dot matrix printer. I am trying to generate a new character for on OKI Microline 5520, and am trying to use the command line for this. The command I am trying to send to the printer is: CHR$(27);%a;@;CHR$(28);CHR$(34);CHR$(65);CHR$(0);CHR$(65);CHR$(0);CHR$(28); CHR$(34);CHR$(73);CHR$(0);CHR$(73); which should create a CE symbol instead of an @ character. +-+-+-+-+-+-+-+-+-+-+-+ X X X X +-+-+-+-+-+-+-+-+-

How to remotely delete subfolders older than x days using forfiles

瘦欲@ 提交于 2019-12-12 02:22:26
问题 I need to remotely delete sub folders older than 7 days, was able to find a syntax like this, but what it does is it loops through the subfolders and deletes the files in it older than 7 days. Any idea how can I delete the subfolders in xFOLDER older than 7 days as well? PushD "\\IP ADDRESS\FOLDERA\FOLDERB\FOLDERC\FOLDERD\xFOLDER\" & ("forfiles.exe" /s /m "." /d -7 /c "cmd /c del @file") & PopD 回答1: You are almost there, just a few things need to be changed: no /S for forfiles , as you are

Java -jar “/users/admin/Sample code/sample.jar” - Space issue

送分小仙女□ 提交于 2019-12-12 02:04:38
问题 I'm trying to trigger a payload installation using java with the help of this code from the command window: " java -jar "/users/admin/Sample code/sample.jar" -payloads "/users/admin/Sample code/payloads" -logfile testing.log -loglevel FINE " But because of the space present in the directory '/users/admin/ Sample code /sample.jar', exception is being thrown. How can i rectify this ? 回答1: (If my understanding is correct, this is more of a shell interpolation problem than a Java problem, so you

image -resize commandline Windows Server 2012 r2

风流意气都作罢 提交于 2019-12-12 01:52:38
问题 I've just updated Windows Server 8 to Windows Server 2012 R2 and got a problem with the image -resize command. I've installed ImageMagick but still having the same error Here's my command FOR %%a IN (*.jpg) DO convert "%%a" -resize 2000x2586! -define jpg:extent=700k "%productImageDir%\zoom\%%a" call:doProgress and here's the error I'm getting when I run it on cmd Invalid Parameter - -resize 回答1: There is a Microsoft CONVERT.EXE that name-clashes with ImageMagick convert . Because of your PATH

Running Windows Command Prompt using R

a 夏天 提交于 2019-12-12 01:41:44
问题 I am rather new to Windows Command Prompt. May I know if it is possible to run windows command Prompt using R? Ie, I would like to use R to input a command into windows command prompt. Thank you in advance! 回答1: In R you can execute any system command using system2. The command for the windows command prompt is cmd . You could then pass arguments using the args parameter of system2 . If your arguments include quotes " you need to escape them using \ , e.g. system2("cmd", args = c("/c", "echo"

VBS file doesn't run through cmd prompt

大兔子大兔子 提交于 2019-12-12 01:12:14
问题 Dim sTestCaseFolder, strScriptPath, sQTPResultsPath, sQTPResultsPathOrig sBatchSheetPath = "D:\Project\Driver Script\Batch.xls" sTestCaseFolder = "D:\Project\" sQTPResultsPathOrig = "D:\Project\Result\" '========== Create an object to access QTP's objects, methods and properties ========== Set qtpApp = CreateObject("QuickTest.Application") 'Open QTP if it is already not open If qtpApp.launched <> True Then qtpApp.Launch End If qtpApp.Visible = True '========== Set the run options for QTP ====

javac not found after set environment variable

好久不见. 提交于 2019-12-12 01:04:34
问题 I am running on a windows 7 machine. I installed java jdk 1.7. I have set the Path and PATH environment variable to point to the java jdk 1.7/bin directory. executing java -version in the command prompt yields java version 1.7.0_45 ... however when I execute javac it says that javac is not recognized as an internal or external command ... I am really stumped on this problem. I really want to get this resolved ASAP. If anyone has experienced similar issues can you please share. All other

How to batch rename files in a directory from a list of names in a text file

廉价感情. 提交于 2019-12-11 23:25:07
问题 I'd like to use Power Shell or a batch file to rename several files in a folder based on a list in a text file. Essentially I want to append the file names with the author's last names (which I have stored in a separate text file). E.g. Currently I have: C:\myfiles 9-ART-2013.pdf 4-EGO-2013.pdf 2-ART-2013.pdf My text file (in same order as files): C:\myfiles _Smith _Jenkins _McMaster I want the files to be renamed as follows: 9-ART-2013_Smith.pdf 4-EGO-2013_Jenkins.pdf 2-ART-2013_McMaster.pdf

Find top 10 processes with wmic command

China☆狼群 提交于 2019-12-11 22:58:45
问题 I know I can do 'wmic process list brief' to display a list of processes. Is there a way to view only the top 10 processes using the most memory? 回答1: @echo off setlocal EnableDelayedExpansion (for /F "skip=1 tokens=1,2" %%a in ('wmic process get name^,workingsetsize') do ( set "size= %%b" echo !size:~-10! %%a )) > wmic.txt set i=0 for /F "skip=1 delims=" %%a in ('sort /R wmic.txt') do ( echo %%a set /A i+=1 if !i! equ 10 goto :end ) :end del wmic.txt Output example: 96931840 iexplore.exe

How to get the memory used of a .exe using command prompt

一曲冷凌霜 提交于 2019-12-11 19:17:44
问题 Using the command prompt, how can i get the memory used when executing a .exe. For example, to find the time taken i can use a .bat file as follows: @echo off time < nul Function.exe time < nul How can i do this for memory used? 回答1: Try this: @echo off mem | find "available to MS-DOS" function.exe mem | find "available to MS-DOS" Output from the mem command (example): 655360 bytes total conventional memory 655360 bytes available to MS-DOS 599312 largest executable program size 1048576 bytes