Search Results

Search found 2563 results on 103 pages for 'batch'.

Page 6/103 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • saving multiple files through xcopy in a batch file

    - by sushant
    for %f in (D:\flexcube1,D:\flexcube2,D:\flexcube3) do xcopy %f D:\o\ /e when i use the following code in command prompt, it works fine. but when i use the same code in a batch file, nothing happens. my batch file simply consists of: for %f in (D:\flexcube1,D:\flexcube2,D:\flexcube3) do xcopy %f D:\o\ /e but it does not work. i dont understand it and i have to use a batch file to copy multiple files. any help is really appreciated

    Read the article

  • Batch command getting error

    - by alice7
    Hi Guys, I wrote a simple batch file which checks whether the c drive path exists then execute the exe in that path else try the d drive path and execute it. IF EXIST c:\program files\x goto a ELSE goto b :a cd c:\program files\x executable.exe c:\temp\col.zip :b cd d:\program files\x executable.exe c:\temp\col.zip Im getting this error: ----Error Ouput-- 'ELSE' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. 'executable.exe' is not recognized as an internal or external command, operable program or batch file. 'dellsysteminfo.exe' is not recognized as an internal or external command, operable program or batch file. I don't know why.

    Read the article

  • issue running a batch script to kill a process

    - by user657064
    I am using the following script on a command line to kill a hypothetical notepad process (using a Korn shell in Windows XP, if that matters): kill $(tasklist | grep -i notepad.exe | awk '{print 2}') Now I take this line, and put it into a batch file c:\temp\testkill.bat, thinking that I should just as well be able to kill the process by running the batch file. However, when I run the batch file, I get the following awk error about unbalanced parentheses: C:/Temp ./testkill.bat C:\Tempkill $(tasklist | grep -i notepad.exe | awk '{print $2}') awk: unbalanced () Context is: {print $2}) <<< C:/Temp So I'm baffled as to why I am getting this error about unbalanced parentheses when I run this script via a batch file, but have no issues when I run the command directly from the command line? (Btw, I'm not necessarily tied to this way of killing a process - as a total noob to shell scripting, I am additionally wondering why if I write the following on the command line: tasklist | grep -i notepad.exe | awk '{print $2}' | kill the process ID that comes out of the tasklist/grep/awk calls doesn't seem to properly get piped to kill...)

    Read the article

  • batch - append either date/time of creation or random to end of filename

    - by Maclovin
    Hi Damsel in distress needing help with a batch-script. I have a bunch of files that one system creates. Either in one of 2 directories, or in the directory above that. The naming is apparently not very important, so It's a bit random. 2 questions for you batch-geniuses out there. a) How can I append date/time of creation to the end of the filename with a batch-script? b) How can I append a random filename (so I make the files unique) with a batch-script? Thanks in advance, dudes and dudettes. Yours sincerely, the Maclovin!

    Read the article

  • How can I run a batch file silently?

    - by Mike Pateras
    I have a batch file with some commands that I need to run with my installer, but I'd rather a console not appear (in Windows). I'm executing the batch file from a WiX installer, via a custom action. I tried adding an @ECHO OFF to the top of the file, but that didn't seem to do anything. Is there a way that I can run this batch file silently?

    Read the article

  • Windows Batch Scripting: Newest File Matching a Pattern

    - by Eddie Parker
    This would be lightning quick in linux, but I'm not familiar enough with windows flavour of batch scripting. Basically I want to look for a series of files matching a certain wildcard, and get the one with the most recent modified date. I've gotten as far as: for %%X in (*.exe) do ( REM Do stuff.... ) But I'm not sure what manner of comparison operators there are, or if there's a better way of doing this. Anyone offer up any good solutions? Ideally it would involve a vanilla install of Vista; so no special trickery like cygwin/etc.

    Read the article

  • Batch Script With SQLCMD Usage

    - by user52128
    Hi All I am Writing a Batch Script Which has to read a set of SQL Files which exists in a Folder then Execute Them Using SQLCMD utiliy. When I am Trying to execute it does not create any output file. I am not sure where I am wrong and I am not sure how to debug the script. Can someone help me out with script? @echo off FOR %F IN (C:\SQLCMD\*.SQL) DO sqlcmd -S LENOVO-C00 -U yam -P yam!@ -i %F -o C:\SEL.txt -p -b IF NOT [%ERRORLEVEL%] ==[0] goto get_Error :Success echo Finished Succesffuly exit /B 0 goto end :get_error echo step Failed exit /B 40 :end

    Read the article

  • Looping through a batch file only if the response is "everything is okay"

    - by PeanutsMonkey
    I have a batch file that loops through the contents of a directory and compresses the files in the directory as follows; for %%a in (c:\data\*.*) do if "%%~xa" == "" "C:\Program Files\7-Zip\7za.exe" a -tzip -mx9 "%%a.zip" "%%a" Seeing that I am using 7zip to compress the file, it returns the message "everything is okay" if it has successfully compressed the file and it then moves onto the next file in any. What I would like to do is the following; Only move to the next file if the response is "everything is okay" If the response is anything but "everything is okay", the error is logged Since an error has occurred, it attempts to compress the file again Once when it has succeeded i.e. "everything is okay" it goes to the next file Steps 3 & 4 only occur a maximum of 3 times before it gives up and moves onto the next file. How can I achieve this?

    Read the article

  • Batch processing multi-TIFF in Irfan view

    - by hemalshah
    I have to convert DPI of more than 5k Tiff images on a monthly basis from 200x200 to 100x100. I can do that in Irfan view using a .bat file that i have created.. the following is the .BAT file code @"c:\program files\irfanview\i_view32.exe" "e:\batch1*.tif /aspectratio /resample /tifc=4 /dpi=(100,100) /convert=e:\batch2*.tif" %* Where tifc=4 is Fax 4 compression However, the above code doesn't help me change the DPI for other pages except for Only the first page in the tiff thats getting converted to 100 DPI. Rest all pages are still 200 DPI. I am using WinXP Professional and Irfan View. Can anyone tell me what I am missing. Or any other alternative program where I can create a .bat file and run the batch process using Command line?

    Read the article

  • net use mapping not working in batch files but works in cmd

    - by Philippe
    Ok so here's the problem : I've got users using logon script in the domain (username.bat). The script simply lists 4 or 5 (net use letter: \\SERVER\directory\). However, when they open their session, the logon script doesnt work and returns system error 53 or 67 for all of them. I tried running the script after the profile has loaded and evrything is running, and it still gives me the error. I've then tried to run the same command in the cmd.exe. Everything mapped correctly. It also works fine if I map the drives using the "Tools Map network drives" utility. Is there anything that can prevent a command to work when ran in a batch-file but works correctly when typed in manually?

    Read the article

  • Using Terminal Services 'query' in batch file

    - by dboarman-FissureStudios
    I have a batch file that checks several of our servers for a user. From the command: query user %userID% /server:ServerName I want to capture the output before it goes to the screen. Is there a way to redirect the output to a variable? The basic gist of what I want to accomplish is this - we iterate through our servers: query user %userID% /server:Server1 query user %userID% /server:Server2 query user %userID% /server:Server3 query user %userID% /server:Server4 Instead of outputting a message that the user could not be found on a specific server, I would like for it to only notify me if it finds the user on a server.

    Read the article

  • How to get LAN ip to a variable in a Windows batch file

    - by Ville Koskinen
    I'm streaming audio from my Windows 7 laptop to a sound card attached to a router. I have a little batch script to start streaming. REM Kill any instances of vlc taskkill /im vlc.exe "c:\Program Files\VideoLAN\VLC\vlc.exe" <parameters to start http streaming> REM Wait for vlc TIMEOUT /T 10 REM start playback on router plink -ssh [email protected] -pw password killall -9 madplay plink -ssh [email protected] -pw password wget -q -O - http://192.1.159:8080/audio | madplay -Q --no-tty-control - & As you see the http stream is hard coded. It would be nice to get the address dynamically to reuse the script on other machines. Any ideas?

    Read the article

  • Delete temporary files from batch script in xp

    - by Keith Bentrup
    I'm looking for a good batch script that would quickly find & clean all the known safe temporary folders/files from Windows (as many variants as possible) machines (e.g. the windows temp folder, all users IE temp folders, etc.). I'm fond of UI tools like CCleaner (over Cleanmgr.exe), but when I'm trying to clean several computers quickly and/or with minimal involvement, it would be nice to have a script. Plus with a script, I could chain several scripts together. Maybe one to then fire up various antivirus and/or malware detectors. Anyone have a good one or can point to a good resource?

    Read the article

  • In Windows, a batch file with a recursive for loop and a file name including blanks

    - by uvts_cvs
    Hello, I have a folder tree, like this (it's only an example, it will be deeper in my real case): C:\test | +---folder1 | foo bar.txt | foobar.txt | +---folder2 | foo bar.txt | foobar.txt | \---folder3 foo bar.txt foobar.txt My files have one or more spaces in the name and I need to perform a command on them, so I am interested in foo bar.txt but not in foobar.txt. I tried (inside a batch file): for /r test %%f in (foo bar.txt) do if exist %%f echo %%f where the command is the simple echo. It does not work because the space is skipped and I get no output. This works but it is not what I need: for /r test %%f in (foobar.txt) do if exist %%f echo %%f It prints: C:\test\folder1\foobar.txt C:\test\folder2\foobar.txt C:\test\folder3\foobar.txt I tried using the quotation mark (") but it does not work: for /r test %%f in ("foo bar.txt") do if exist %%f echo %%f It does not work because the quotation mark is still included in the output: C:\test\folder1\"foo bar.txt" C:\test\folder2\"foo bar.txt" C:\test\folder3\"foo bar.txt"

    Read the article

  • Changing ati graphics setting into a batch file

    - by FrozenKing
    I want to change my saturation level to zero and again to default but I can do it manually by going to ati catalyst center. Since, I want to do it regularly I need some batch file code or program to alter this settings in a click or using shortcut keys. The reason I am doing this because I want to change my screen to black and white from color since b/w will make my eyes less tired then a colored display. I came to know about this saturation from my previously asked question : Changing display color from B/W to color (vice-versa)using a program.

    Read the article

  • Batch Script With SQLCMD Usage

    - by user52128
    Hi All I am Writing a Batch Script Which has to read a set of SQL Files which exists in a Folder then Execute Them Using SQLCMD utiliy. When I am Trying to execute it does not create any output file. I am not sure where I am wrong and I am not sure how to debug the script. Can someone help me out with script? @echo off FOR %F IN (C:\SQLCMD\*.SQL) DO sqlcmd -S LENOVO-C00 -U yam -P yam!@ -i %F -o C:\SEL.txt -p -b IF NOT [%ERRORLEVEL%] ==[0] goto get_Error :Success echo Finished Succesffuly exit /B 0 goto end :get_error echo step Failed exit /B 40 :end

    Read the article

  • Windows: How to add batch-script action to Right Click menu

    - by ervingsb
    I have a few programs that creates temp files or backup files or similar files that are not important. For example, GVim for Windows by default creates a backup file in filename.txt~. I sometimes need to clean up a dir and remove all these files. I have made a simple .bat file for this. However, it is cumbersome to have to start up cmd, navigate to the folder, run the script. Especially since this is a script that I would like to run often on various folders. And I do not want to copy the script to multiple folders, as this would be a maintenance nightmare. So, I was thinking, that the best solution would be to add a Right Click menu item that allows me to run the script. So that I can right click on a folder in Explorer and click Cleanup and then have my script run on this folder. So my question is: How do I add a right click menu action that runs a custom batch script?

    Read the article

  • Delete temporary files from batch script in xp

    - by Keith Bentrup
    I'm looking for a good batch script that would quickly find & clean all the known safe temporary folders/files from Windows (as many variants as possible) machines (e.g. the windows temp folder, all users IE temp folders, etc.). I'm fond of UI tools like CCleaner (over Cleanmgr.exe), but when I'm trying to clean several computers quickly and/or with minimal involvement, it would be nice to have a script. Plus with a script, I could chain several scripts together. Maybe one to then fire up various antivirus and/or malware detectors. Anyone have a good one or can point to a good resource?

    Read the article

  • Multithreaded Windows FOR batch command

    - by Axarydax
    Hi, do you know if there is a simple way to run FOR command in batch file on multiple threads? What's the point of having 4 cores if I can't run my tasks in 4 parallel threads? For example, if I am optimizing PNGs with PNGOUT, the command I would use is for %i in (*.png) do pngout "%i" But this is highly paralellizable task in which the sub-tasks do not depend on each other at all. To run this in 4 'queues' I'd write something like for -thread 4 %i in (*.png) do pngout "%i" Do I need to write my own for-like app that would be able to do this or is there available free solution?

    Read the article

  • Batch converting video from avc1 to xvid

    - by Tommy Brunn
    I need a way to batch convert 720p video files from avc1 to xvid in Ubuntu 10.04. I'm not terribly concerned about file size, but I do wish to retain the picture quality as much as possible. I believe the audio is encoded as aac, which is fine for my purposes. What would be the best and easiest way to do this? I've tried using Handbrake. During my first attempt, I had it using ffmpeg to convert to MPEG-4, but that just gave me a super-low quality video at twice the file size. Trying h.264 now, so we'll see how that works out. But just in case it doesn't pan out so well, what other ways do you recommend? I was thinking I'd write a bash script to reencode the files one by one, but the problem is that I have very little knowledge about codecs and containers and whatnot - so I wouldn't know what parameters I would pass ffmpeg/mencoder.

    Read the article

  • Batch convert of Word docs with images to HTML

    - by dylpickle
    OK, here is my situation: I made a knowledge base for a company, they have about 500 word documents with screenshots in them explaining procedures and such. I can easily paste the text into the cms wysiwyg editor on the knowledge base but the images need to be uploaded one at a time, then sized and placed in the article. Question: Is there any suggestions for an automatic method to to convert the documents to html with the appropriate image tags and links to the images in them, and export/package the images for ftp upload? I can already convert them to HTML automatically using a batch file and a program, but converting the images to the correct tags with href link, then exporting them for ftp is where i need some help. Might not even be possible, but if anyone has tried to do something like this I would like to here how you approached this.

    Read the article

  • Batch script to create home home directories from list of names

    - by Steven
    I'm trying to create a home directories with permissions from a text file. I can only get the batch file to run the first line. Can anyone tell me why? I initiate the scripts by running go.bat as administrator. go.bat @echo for /f %%a in (users1.txt) do call test.bat %%a test.bat @echo off m: cd \ mkdir %1 icacls %1 /grant %1:(OI)(CI)M cd %1 mkdir public icacls public /inheritance:d icacls public / All:(OI)(CI)(RD) icacls public /grant All:(OI)(CI)R mkdir private icacls private /inheritance:d icacls private /remove All cd \ users1.txt user1 user2 user3

    Read the article

  • Free batch image watermarking software

    - by Blade
    Hi everyone. I'm looking for a simple yet effective software to watermark a lot of photos in batch. I have to apply a transparent png watermark image on 400 photos. The program have to place the watermark at a custom position relative to the bottom right corner of every picture. I would have done this in photoshop, but the scriptable action doesn't allow me to do conditionnal placing if the photo is portrait or landscape. I'm looking for a free lightweigh program. Thank you !

    Read the article

  • Batch file to open multiple cmd prompts

    - by JHarris
    I am trying to write a batch file that will automate the following manual process: Open a new cmd prompt (prompt1) Run a bat file (b1) Run a program (that will continue to run) Minimize prompt1 Open a new cmd prompt (prompt2) Run a bat file (b1) Run a different program (that will continue to run) Minimize prompt2 I've found ways to open multiple instances of cmd to run different things, but after I've run the first thing (b1), I then need to run a program in that same cmd window. I currently have start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat This opens the two windows and runs the bat, great, but now I need to execute another command (running a python file) in each of the cmd windows. How do I send commands to each prompt?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >