Search Results

Search found 39339 results on 1574 pages for 'batch files'.

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

  • Automatically restore windows network drive (red "X") via batch file

    - by user33958
    i need check if a network drive is mapped and accessible. From time to time windows displays a red X on the drive, and i would need to manually click the drive in explorer to reconnect. I already found solutions which involve editing the registry which unfortunately isn´t possible. So i would need a batch file checking for connection, and (re-)mounting the drive. What i´m using at the moment: IF NOT EXIST z: net use z: \\10.211.55.5\test

    Read the article

  • Batch file to check the size and print the outout

    - by OraR
    I am trying to make a batch file and that would check the size of f1.txt file and if the size is 1118 then no changes will be displayed if not the file has been changed. @ECHO OFF set maxbytesize=1118 set "filename=f1.txt" for %%A in (%filename%) do echo.Size of "%%A" is %%~zA bytes if %%~zA==%maxbytesize% ( echo "No Changes" pause >nul exit ) echo "Changes" pause >nul exit Please can someone let me know any possible guidelines for the above. Thanks.

    Read the article

  • Make a batch file find duplicate file names with different extensions, and actions on the results

    - by Bringo
    What I want to do is have a batch file search folders, and subfolders, for matching file names that are ending in .mp3 and .wma and delete or move the *.wma duplicates. Below you'll find what I have come up with until now, I know it is wrong for at least two reasons. I have searched the internet, and tried a number of things, but now I am stuck. Can anyone please help me with this? for /r %%f in "(%userprofile%\my music\* - ?.*)" do del "%%f" /s/p

    Read the article

  • Old files on computer not visible after upgrade

    - by Srinivasan
    I recently upgraded Ubuntu OS to 12.04.01 version by selecting the option to upgrade and preserve old files. After installation, I am not able to view my old files on the computer. Can anyone help to retrieve all the old files and make it available with the new installation? The computer hard disk shows that it still has the capacity nearly full with all my old files. Netbook Acer AOA150 model. Thanks in advance. Srinivasan

    Read the article

  • Batch copy gives errors, xcopy works fine

    - by ndm13
    I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon learning that xcopy was deprecated in favor of robocopy in Vista and newer, still wanting to maintain compatibility I decided to switch to the non-deprecated copy. This is where the problems begin. I'm trying to fix the copy routine. I thought I had everything sorted out, but it doesn't copy anything. My output is zero files copied for every iteration. Original Code using xcopy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( echo f | xcopy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /q /y /g /c ) Revised (broken) Code using copy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( copy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /d /y /z ) Output: The system cannot find the path specified. 0 files copied. I know that it seems everyone uses either xcopy or robocopy but can anyone help with copy? Note: I'm using Batch to keep it very lightweight and command-line accessible.

    Read the article

  • Redirect batch stderr to file

    - by nivlam
    I have a batch file that executes a java application. I'm trying to modify it so that whenever an exception occurs, it'll write the STDERR out to a file. It looks something like this: start java something.jar method %1 %2 2>> log.txt Is there a way I can write the arguments %1 and %2 to the log.txt file as well? I don't want to write it to the log file everytime this batch file gets called, only when an exception occurs. I tried searching for a way to redirect STDERR into a variable, but I couldn't figure it out. Ideally I'd like the log file to look something like: Batch file called with parameters: - "first arg" - "second arg" Exception: java.io.exception etc... ------------------------------------ Batch file called with parameters: - "first arg" - "second arg" Exception: java.io.exception etc...

    Read the article

  • configure batch to sent minute info instead of entire stdout

    - by Daniel
    Hi all, I am working on a RedHat server along with several other users. We use the batch utility to set a job queue. Some of the programs that I use write stuff to stdout during the run, with info on who much data has been processed to far and estimated time until completion etc. batch -q z at> myScript -i somefile -o someotherfile By default, the batch util send an email to me (since I configured it using .forward) with the entire output from stdout. Since the scripts writes something to stdout a few times each second, the amount of log-stuff I get from a two-day script can be ˜20 Mbs. Clearly not what I want. I can of course pipe stdout to a file like so batch -q z at> myScript -i somefile -o someotherfile > myscript.stdout.log but then I get a blank e-mail from the util. So to my question: Is it possible to configure batch so that it sends time the job started and ended, or run time or some oth valuable information to me, instead of a 20 Mb mail or a blank mail? Note that the scripts that I use are binaries and I cannot customize the code to output less info in the first place (which would be the optimal solution I guess). Thanks /Daniel

    Read the article

  • Howcan I get started with Spring Batch?

    - by C. Ross
    I'm trying to learn Spring Batch, but the startup guide is very confusing. Comments like You can get a pretty good idea about how to set up a job by examining the unit tests in the org.springframework.batch.sample package (in src/main/java) and the configuration in src/main/resources/jobs. aren't exactly helpful. Also I find the Sample project very complicated (17 non-empty Namespaces with 109 classes)! Is there a simpler place to get started with Spring Batch?

    Read the article

  • Batch File input validation - Make sure user entered an integer

    - by B2Ben
    I'm experimenting with a DOS batch file to perform a simple operation which requires the user to enter a non-negative integer. I'm using simple batch-file techniques to get user input: @ECHO OFF SET /P UserInput=Please Enter a Number: The user can enter any text they want here, so I would like to add some routine to make sure what the user entered was a valid number. That is... they entered at least one character, and every character is a number from 0 to 9. I'd like something I can feed the UserInput into. At the end of the routine would be like an if/then that would run different statements based on whether or not it was actually a valid number. I've experimented with loops and substrings and such, but my knowledge and understanding is still slim... so any help would be appreciated. I could build an executable, and I know there are nicer ways to do things than batch files, but at least for this task I'm trying to keep it simple by using a batch file.

    Read the article

  • 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

  • How to batch rename files using bash

    - by Alex Popov
    I know there are lots of such questions, but I couldn't find one (or a combination of several), which describes the things I want to do. I think I need to use regular expressions, but I am not very good with that. I use zsh. I have a folder with files, which I want to rename: I want the files challenge1.rb, challenge2.rb, challenge3.rb, etc. to be renamed to c1.rb, c2.rb etc. Similarly task1.rb and similar must be renamed to t1.rb etc. sample_spec_c1.rb, sample_spec_c2.rb etc. must be renamed to c1_spec.rb, c2_spec.rb etc. So I guess I need some combination of regular expressions and iteration, but I don't know how to write the bash script.

    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

  • file acess slow after deletion of many files

    - by stefan
    I recently accidentally created millions of files in one folder (rougly 5 million) and due to limitations I couldn't process them correctly (maximum argument count exceeded for wc / ls and such stuff). So I deleted them, which took quite a while, but now they're gone. I deleted the files with a regular rm. It weren't any system files. So the files are definitively deleted, but the system is very slow on file stuff now. ls, cat and auto-complete by pressing tab freezes the terminal for several seconds. Is this some sort of fragmentation issue? Is it an issue with the files beeing still somehow present?

    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

  • Need a graphical renaming tool which can rename files recursively

    - by user37991
    ATM I am forced to use freeware in Windows to rename SOME Linux data files. Linux also creates files like "Filename.ext" as being different to "filename.ext", and !@#$hg".ext ... which cannot be recognized by Windows. "pyrenamer" ... mentioned in another answer cannot auto-rename more than the one immediate folder. I use Ubuntu, not ARCH linux, because I am not CLI. Despite some answers here (designed by and for CLI programmers), how can Ubuntu GUI (not CLI) do file renaming? BTY: in ONE folder only, THUNAR is far better than silly pyrenamer. But Thunar cannot auto-rename recursively.

    Read the article

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