@echo off REM This batch file will play with shift command :loop echo %1 shift if %2 == GOTO end goto loop :end exit 0 When I inputted C:\Users\~\Desktop> Shift.bat 1 2 3 I got this 1 2 end was unexpected at this time. Why do I keep getting "end was unexpected at this time.

Member Avatar
Member Avatar
+0 forum 4

I'm in a class and we discussed what set /p does, but I wasn't paying close attention, I was wondering if anyone could explain to me what set /p does and an example of how I can use it in a batch file for dos

Member Avatar
Member Avatar
+0 forum 3

![3a451fbd93eb17f84f06c7ac648bdcab](/attachments/small/2/3a451fbd93eb17f84f06c7ac648bdcab.PNG "align-left") I need to create this program for class. I'm not looking for the answer. I'm simply confused on how to create a batch file where I input a number and it gives me an option. Would I use the IF command if so how would I do it. My teacher is awful and he doesn't explain anything. Here is what I got so far @ECHO OFF ECHO This BAT file will display the symbol of your choice Echo. ECHO 1. Stars ECHO 2. Dollars ECHO 3. Pluses ECHO e. Exit Program ECHO. ECHO Enter your choice (1, 2, …

Member Avatar
Member Avatar
+0 forum 9

Hi all, I was looking for a way to execute windows batch file from java code, and I was able to do this with the following code. [CODE] Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("cmd /C " + "path" +exec.bat"); [/CODE] The batch file refers to some other files and executables in current directory and using relative path. Since the java program is executed from a path different from the location of the batch file, the batch program cannot find the files/executables it is referring to This leads to the batch program creating errors like [CODE]ERROR>>Could Not Find D:\xxx\Build …

Member Avatar
Member Avatar
+1 forum 5

Heeey guys!! Where's the forum for Batch Scripting!?!? Imma noob if it's Shell Scripting... ~~Zephyr

Member Avatar
Member Avatar
+0 forum 1

help me in this code .. it is not work .. public static void CreateFile() throws IOException { File f; f = new File("myfile.bat"); if (!f.exists()) { f.createNewFile(); System.out.println("New file \"myfile.bat\"has been created"); } } public static void getFiles(String path) { File dir = new File(path); String[] children = dir.list(); if (children != null) { for (int i = 0; i < children.length; i++) { String filename = children[i]; File file = new File(path + File.separator + filename); if (!file.isDirectory()) { if (file.getName().endsWith(".exe")) { System.out.println("File Name " + filename + "(" + file.length() + " bytes)"); } } else { …

Member Avatar
Member Avatar
-1 forum 9

hai , I used LINQ in application. I want to perform batch update. For that i used the code as: [CODE] int[] istudentId = new int[]; int j = 0; for (int i = 0; i < GrdStudent.Rows.Count; i++) { if ((GrdStudent.Rows[i].FindControl("chkSelect") as CheckBox).Checked) { istudentId[j] = ObjStudent.Student_Id; j++; } } DataContext ctx = new DataContext(); ctx.ExecuteCommand("update SCH_Student_Promotion_Master set Class_Id='" + DdlClassTo.SelectedValue + "' where Student_Id in('" + istudentId + "')", "", ""); [/CODE] but i got some Error like: Conversion failed when converting the varchar value 'System.Int32[]' to data type int. Thanks in advance Sreevidya

Member Avatar
Member Avatar
+0 forum 1

Process p = Runtime.getRuntime().exec("C:\\tc\\bin\\" + prog_name , null); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getInputStream())); System.out.println("Here is the standard op :\n"); s1=stdError.readLine(); i have this code can anyone tell me how to run c program using java thanks !

Member Avatar
Member Avatar
+0 forum 1

Let me tell you I already got the tutorial on how to do this [url]http://db.apache.org/derby/docs/10.3/adminguide/tadminconfig814963.html[/url] But sincerely speaking I did not understood how to do any of the two methods described. Let me tell you my confusions and what I didn't understood and I am developing my project in netbeans. 1) How to set up a properties file(I never worked with them, so really have no idea) and if not required then where to find this derby.properties file and exactly how to enter that string in it. 2) And how to make my java code to execute that propeties file …

Member Avatar
Member Avatar
+0 forum 8

I wasn't sure which section to post this under but I am working on an assignment in SQL and have created a batch file to make the tables, load the data into the tables, and then sends several queries to sql to get results. Is there a way I can write the output from this batch file to a .txt file somewhere on my system? I have tried to look this up in several different places but have not had too much luck understanding them. I am fairly new to SQL.

Member Avatar
Member Avatar
+0 forum 1

I have an electronic subscription to a newspaper and I generally download and print the puzzles for doing them later. Due to health issues, I'm behind about 6 months, but I'd like to catch up. I'd like a script to automate the download and save it to my PC. I'm a former (retired!) IT person but so out of date with technology, I'm not sure I can do this anymore. The date must go in the link in two places. Since I'm about 6 months behind, that's alot of manual downloading and saving. There is no need for user ID …

Member Avatar
Member Avatar
+0 forum 2

I'd like to have a windows forms application execute a command line instruction similar in structure to the following: ProcessText file1 file2 where ProcessText is a working console tool for automated text processing, file1 is the text I need processed, and file2 is the created text output. From the command line I can get this to work so long as I'm in the same directory with ProcessText and file1. But I'm trying to automate the process for an unknown number of files within my form application. So far I've tried: [CODE] System.Console.WriteLine("ProcessText file1 file2") 'and... Shell("ProcessText file1 file2") [/CODE] but …

Member Avatar
Member Avatar
+0 forum 2

I have this very weird project that my boss gave me. Given my cws.sql file inside "C:/", i need to create a batch file wherein it will automatically create database cws; and use cws; in MySQL Server. Hope Someone can help me. :'(

Member Avatar
Member Avatar
+0 forum 3

Not sure this is the right place to put this. I have a batch file for a program that I'm writing, which takes a C source file, compiles it and runs it, and then tries to save the output of it to a .txt file. The program lets a user enter some C code, and then when the compile button is pressed, it compiles the code, and prints out the output in the same program. It works fine for programs that require no user input, such as a simple "Hello, world" program, but when input is required, the window that …

Member Avatar
Member Avatar
+0 forum 1

I've got a little app to resize and watermark images. At the moment it only does one at a time but I would like to get it to do a full folder of images in one go. I have done this previously in VB using loops but im new to python and can't seem to get it to work. The running bit of the code I have is below and "watermark" is a function that given the 3 parts overlays and saves the image. [CODE]def run(): #define variables and loop here #jpeg load and save a = tkFileDialog.askopenfile() im = …

Member Avatar
Member Avatar
+0 forum 4

Newbie problem. For some reason, I can't get this to work: [CODE] FOR /L %%A IN (1 1 23) DO ( if %%A==1 set drive=C: if %%A==2 set drive=D: if %%A==3 set drive=E: if %%A==4 set drive=F: if %%A==5 set drive=G: if %%A==6 set drive=H: if %%A==7 set drive=I: if %%A==8 set drive=J: if %%A==9 set drive=K: if %%A==10 set drive=L: if %%A==11 set drive=M: if %%A==12 set drive=N: if %%A==13 set drive=O: if %%A==14 set drive=P: if %%A==15 set drive=Q: if %%A==16 set drive=S: if %%A==17 set drive=T: if %%A==18 set drive=U: if %%A==19 set drive=V: if %%A==20 set …

Member Avatar
Member Avatar
+0 forum 2

The End.