HI All! I need to have some help. I have a python function name is abc.py and variable is declared in abc.py, variable name is 'uname'. How can i call variable name 'uname' of abc.py in my batch file name testing.bat and get uname value in my batch testing.bat file? Best Regards Sarfraz

Member Avatar
Member Avatar
+0 forum 8

Hi I try to upload my picture to local server via FTP Batch file I created script.batch which is contain open 127.0.0.1 Tony 123abc #cd public_html lcd C:\xampp\htdocs lcd XAMPP Shared Folder binary mput C:\Users\Laptop\Desktop\XAMPP Shared Folder\AboutMe.jpg bye I have also another script(upload.batch) which is contain `ftp -i -s:script.bat` When I run upload.batch file it happen nothing? I wonder why? Is there any better code to upload picture to server? I appreciate your help

Member Avatar
+0 forum 0

I'm creating an application that with continuously attempt to run a list of programs until they are open. I'm having an issue when it comes to programs that require administrative priveleges however. I've done some searching and found the below script (in createElevationScript()) that *should* run a program with administrative priveleges, however it doesn't start the program successfully. Here's the relevant code: public void tryStart() { if (!checkRunning()) { try { ProcessBuilder processBuilder = new ProcessBuilder(); processBuilder.command(path); processBuilder.start(); } catch (IOException e) { System.out.println("ForceStartUp: Insufficient privileges to run ProgramEntry with Name '" + name + "' at Path '" + …

Member Avatar
Member Avatar
+0 forum 5

I was wondering if it is possible to make [I]an online multi-player game server preferably in batch.[/I] I am hoping to make a PowerPoint game that can be multi-player with the help of batch. Also even answers that do not suit my requirements fully will help, because i am 11 years old and this is about all I know of batch script: @echo off @echo on echo (%time%) (%date%) (%Computername%) (%Username%) cls dir /s del ren rename title color echo. ping localhost -n (number in seconds) >nul pause start (path) (or filename.extension if the file is in the same folder) …

Member Avatar
Member Avatar
+0 forum 15

Hello Guys, I apologized if I may have misplaced this post as I cannot see CURL on any category. Here is my situation. I am trying to create a batch file which will pull up information from a fleet of devices via its web interface. I am using CURL to do that. The output will be 1 file for each device. I created a text file that lists all the IP address of the devices. Below is the command I usedd for just one device: curl http://<IP>/cgi-bin/history > <nameOFfile.txt> Any help will be much appreciated. Thanks.

Member Avatar
Member Avatar
+0 forum 3

i want to make a batch file to ping an ip. it must have 4 conditions. 1: if destination ip is reach able then it should display "host reachable" 2: if destination ip not reachable then it should display "host not reachable" 3: if request times out then it should display "timed out" 4: if any other error then it should display "undetected error" i am able to make batch file for first two conditions, but how to trace request timed out. any body can help regarding this? thanks.

Member Avatar
Member Avatar
+0 forum 1

Here is my another challenge. When I pass the file name into for loop, I want to get a specific word from the file name and need to pass that as a parameter as well. For eg: When there are 5 files in a folder say Encrypted_abc_1.xml Encrypted_xyz_2.xml Encrypted_hij_3.xml Encrypted_klm_4.xml Encrypted_nop_5.xml I want to pass the file name Encrypted_abc_1.xml and abc into the for loop. I got the answer for both in seperate for loops however how can i merge into one single for loop First for loop will fetch the word for /f "tokens=2 delims=_." %%a in (Encrypted_*.xml /b) …

Member Avatar
Member Avatar
+0 forum 1

i m trying to run a mp3 file on dosbox plateform by c .i put the following code in to the batch file start c:\xyz.mp3 and trying to call this as system("c:/a.bat"), the system funtion is returing 0 but it is not running it. But the same code working well on Cmd . i m using win 7 32 bit..

Member Avatar
Member Avatar
+0 forum 10

First, to explain what I want to do: I have a folder structure like this: BSDS300\images\test\ -which contains JPEG files, and some other files(only .jpg files are of interest) BSDS300\human\color\ -which contains many folders, in which I have .seg files with the same name as the .jpg file Example: BSDS300\images\test\3096.jpg BSDS300\human\color\1110\3096.seg BSDS300\human\color\1109\3096.seg What I want is to generate a text file in the first location with the same name as the .jpg file, which will contain the absolute paths of every location that contains a .seg file(with the same name) what I've tryed so far, is something in the command …

Member Avatar
Member Avatar
+0 forum 1

Okay, there may already be a post out here that is similar to this, but I wasn't able to find anything that was helpful. Scenario: I have a zip folder that contains a folder structure (web site) and batch file. Objective: I need something that will enable a user to download the zipped folder - but, while it is being downloaded, it will unzip the folder, save the folder to their Desktop and run the batch file. I have an EXE file that does this, however, since a majority of the users will only have basic rights on their computers, …

Member Avatar
Member Avatar
+0 forum 1

I know with linux when I want to change the color code I can type in echo -e \033[COLORm] Is there an easy way like this to change the color in windows scripting. I tried @echo off REM This program will list all the colors REM Selected by user input set /p color=Enter the color you would like to use to display the sentence Hello World: if %color% == [Blue] color 01 Echo "Hello World" Pause Exit 0 Why can't I simply type in color followed by the code But I had no luck, I'm still new at this. Any …

Member Avatar
Member Avatar
+0 forum 3

@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 i need to create a batch file when it is double click it should run the code

Member Avatar
Member Avatar
-1 forum 1

Hi every one, I have a question. I have many files with this format: a...a-Cb...b-d...d a...a-b...b-Cd...d a...a-b...b-Cd...d-e...e so that : 1- a...a is a number with **m** digits, 2- b...b is a number with **n** digits, 3- d...d is a number with **p** digits, 4- e...e is a number with **q** digits. and have many folder with respect to these files with this format: "Cb...b-d...d #" "Cd...d #" "Cd...d-e...e #" so that instead of # character, i have words with unicode character like this: "C234-1 عربی" I want a batch file, so that move by this method: 1- move files …

Member Avatar
Member Avatar
+0 forum 1

I have an batch script that needs to concatenate several hundred of lines (72 chars) in one long line for base64 to decode. He used line reading because of the windows XP line limit (8191 chars per line). The script currently has 2 issues at result: It exports with 2xquote character between my 72 char lines (like so: "addf4534@$") and base64 doesn't like that It creates several 2-3 lines extra. The last line being the correct one. Here is the script (install.zip its what is going to be encoded for later decoding): @echo off CALL D:\utilities\base64.exe -e install.zip install.txt set …

Member Avatar
+0 forum 0

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

This is my first post in this forum. Suppose there is a web page with url : www.somesite.com/pages/1 I can save this page easily using Ctrl+s within a second. But my question is if there are say,600 web pages starting from www.somesite.com/pages/1 to www.somesite.com/pages/600 and I want to save all of them then using Ctrl+s it will take a lot of time. So is there any way to write a batch script using which I will be able to do this by double clicking the .bat file.I know batch programming but I can't figure out how to accomplish this.Can someone …

Member Avatar
Member Avatar
+0 forum 2

when trying to output the string of a variable to a text file, the string try's to run and therefore pops up like this, %localDrive% 2>>fileCompare.log 'C:' is not recognized as an internal or external command, operable program or batch file. Any ideas?

Member Avatar
Member Avatar
+0 forum 2

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

Member Avatar
Member Avatar
+0 forum 1

how can i convert xml based script; which is created by SqlYog software. I want to convert this xml based script to batch file (full coding from xml to batch file script; not only batch(.bat) format.) So i can run the synchronization / backup directly clicking with batch file. give me code for this procedure. like @echo off CLS...... type format.

Member Avatar
Member Avatar
+0 forum 2

Hello I would like to know how to make .bat files with a time trigger some thing like this: I make a file with autorun and it ahs a time trigger and after two monts it opens this file... can someone please help me resolve this problem..... thanks...

Member Avatar
Member Avatar
+0 forum 7

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

I need to create a service that will call a batch file. Here's the catch though - once the service calls the batch file, the command window that the batch file runs in must be visible on the desktop, it cannot run hidden. So far nothing I've tried results in the command window being visible. Any suggestions?

Member Avatar
Member Avatar
+0 forum 5

Hey guys, I've searched all over the web for help but couldn't find anything, so I've decided to give up and come here. Here's my problem: I want to be able to run system restore automatically. NOT to create restore points, but to restore the computer to either the most recent restore point or any other. While it does this, I don't want the GUI to be displayed. It can run silently and however it wants, but the user should not be able to give any options. The reason am doing this is because am trying to setup a management …

Member Avatar
Member Avatar
+0 forum 6

I was dragging and dropping flv files onto this bat file so I could watch in fullscreen on my second monitor:[CODE]set vlcPath="C:\Program Files\VideoLAN\VLC\vlc.exe" %vlcPath% %1 --video-x=1366 --video-y=768 --width=300 --height=300 --fullscreen --no-video-title-show --no-embedded-video --no-qt-fs-controller[/CODE] but would rather write a batch file with a menu so I could simply select the video I want and it would run with the above parameters. here is what I got so far [CODE]@echo off color 07 title VLC Video Menu echo. echo What you tryna watch?!?: echo=================== echo. echo 1. Adapter Cards - Part 1 of 2 set choice= set /p choice=Type the number to …

Member Avatar
+0 forum 0

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

this is in execute method() { Process p = Runtime.getRuntime().exec(command, env); } System.out.println(r.execute(" C:\\Program Files\\Java\\jdk1.6.0_21\\bin\\javac demo.java” , null)); System.out.println(r.execute(" C:\\Program Files\\Java\\jdk1.6.0_21\\bin\\java demo”, null)); i want to run demo.java from this code i used timer class also. i got the error "Illegal execution time" i dont know why when i run this program in eclipse it does not give me output but when i run this on command prompt then it gives me error can anyone help me Thanks in advanced!!!!!!!!

Member Avatar
Member Avatar
+0 forum 2

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

The End.