Jump to content
xisto Community
RGF

Batch Files Tutorial

Recommended Posts

I need a helpBatch Files

Hi,I just need a batch file or whatever to run it and to simply delete one file .Cfg extension.That's all that I need,so if anyone can show me how to make that batch file cause when I "make" it,it keeps saying "System cannot find specified file" and yeah,I checked all the paths and paths are right.

just need a "program" to run for a second that will delete one file,thats all. Thanks

-question by Stefan

Share this post


Link to post
Share on other sites
I want to create a batch file the creates a Folder called= Themes & MODSBatch Files

TRY THIS

The ":BEGIN" here is not required so you can right like this

 

@ECHO OFF

ECHO. **************************************ECHO. **   PSPWillys PSP Custom waves 2009 *   ECHO. ** For XMBeditor v2 Running CFW 3.90m33-2**   ECHO. **************************************ECHO.ECHO.ECHO.ECHO.ECHO.

set destination=Md "F:Themes&ModsModssystem_plugin_bgAllsort"

Md  %destination%

Copy AllsortPreview.Jpg %destination%

exit

-Aymen

Share this post


Link to post
Share on other sites

I need a help

 

Batch Files

 

 

 

<p>Hi,I just need a batch file or whatever to run it and to simply delete one file .Cfg extension.That's all that I need,so if anyone can show me how to make that batch file cause when I "make" it,it keeps saying "System cannot find specified file" and yeah,I checked all the paths and paths are right.</p>

<p>just need a "program" to run for a second that will delete one file,thats all. Thanks </p>

 

-question by Stefan

If y have cygwin or another set of Unix tools for windows, it's rather simple : You write a file containing

find . -name *.Cfg -print |grep rm
If you don't have any Linux collaborative tool and you don't want to install even the command-line part of cygwin, you can do the search job using windows search ( https://support.microsoft.com/en-us/products/windows ).

I did not try it, but it should be simple to put the search file result in a text file, and remove all the files listed in that text file.

Share this post


Link to post
Share on other sites
How to open multiple files one after anotherBatch Files

> I would like to open multiple files from a batch file.My code is> > Call file x> Call file y> And so on


Here is another idea.

Put a list of files in file C:/FileList.Txt, one path/file per line. Then execute the following script.

 # Script OpenFiles.Txt

var string filelist, file
cat "C:/FileList.Txt" > $filelist
lex "1" $filelist > $file
while ($file <> "")
do
    system ("""+$file+""")
    lex "1" $filelist > $file
done

 Script is in biterscripting language. Save the script in file, say, "C:/Scripts/OpenFiles.Txt".

 Run the script by entering the following command in DOS prompt.

 "C:biterScriptingbiterScripting.Exe" "C:/Scripts/OpenFiles.Txt"

-reply by ranjankumar

Share this post


Link to post
Share on other sites
How to customize NotepadBatch Files

Hi,

I need a Notepad with out file menu option ( Like  Save,Save as and Print), Is there any way we can create a Script for this ??

-reply by Krish

Share this post


Link to post
Share on other sites

ya like wanhafizi was saying if you want to turn your batch files into .exe (programs) there is a good Tool to help you with that.... thnx for the heads up man forgot about that part :P

Another way is to build an own executable that comes within the batchfile.
One method for to do this is to put some opcodes behind echo-commands and to redirect them directly into an executable-file. (But not all opcodes and values can be echo out.)
A second method is to put some hexadecimal values of opcodes (+ some debug-commands) behind echo-commands and to redirect them into a new textfile and to commit this textfile starting debug.exe. Debug get the opcodes and execute them.

This example is checking how much space is free on a 2GB-drive.
@echo off	   if not (%1)==() goto DOIT	   echo.	   echo Error !!! Please commit a driveletter.	   echo Example "C[:]" !	   echo.	   exit	   	   :DOIT	   if (%1)==(A:) set Drive=1	   if (%1)==(B:) set Drive=2	   if (%1)==(C:) set Drive=3	   if (%1)==(D:) set Drive=4	   if (%1)==(E:) set Drive=5	   if (%1)==(F:) set Drive=6	   if (%1)==(G:) set Drive=7	   if (%1)==(H:) set Drive=8	   if (%1)==(I:) set Drive=9	   if (%1)==(J:) set Drive=a	   if (%1)==(K:) set Drive=b	   if (%1)==(L:) set Drive=c	   if (%1)==(M:) set Drive=d	   if (%1)==(N:) set Drive=e	   if (%1)==(O:) set Drive=f	   if (%1)==(P:) set Drive=10	   if (%1)==(Q:) set Drive=11	   if (%1)==(R:) set Drive=12	   if (%1)==(S:) set Drive=13	   if (%1)==(T:) set Drive=14	   if (%1)==(U:) set Drive=15	   if (%1)==(V:) set Drive=16	   if (%1)==(W:) set Drive=17	   if (%1)==(X:) set Drive=18	   if (%1)==(Y:) set Drive=19	   if (%1)==(Z:) set Drive=1a	   if (%1)==(a:) set Drive=1	   if (%1)==(b:) set Drive=2	   if (%1)==(c:) set Drive=3	   if (%1)==(d:) set Drive=4	   if (%1)==(e:) set Drive=5	   if (%1)==(f:) set Drive=6	   if (%1)==(g:) set Drive=7	   if (%1)==(h:) set Drive=8	   if (%1)==(i:) set Drive=9	   if (%1)==(j:) set Drive=a	   if (%1)==(k:) set Drive=b	   if (%1)==(l:) set Drive=c	   if (%1)==(m:) set Drive=d	   if (%1)==(n:) set Drive=e	   if (%1)==(o:) set Drive=f	   if (%1)==(p:) set Drive=10	   if (%1)==(q:) set Drive=11	   if (%1)==(r:) set Drive=12	   if (%1)==(s:) set Drive=13	   if (%1)==(t:) set Drive=14	   if (%1)==(u:) set Drive=15	   if (%1)==(v:) set Drive=16	   if (%1)==(w:) set Drive=17	   if (%1)==(x:) set Drive=18	   if (%1)==(y:) set Drive=19	   if (%1)==(z:) set Drive=1a	   if (%1)==(A) set Drive=1	   if (%1)==(B) set Drive=2	   if (%1)==(C) set Drive=3	   if (%1)==(D) set Drive=4	   if (%1)==(E) set Drive=5	   if (%1)==(F) set Drive=6	   if (%1)==(G) set Drive=7	   if (%1)==(H) set Drive=8	   if (%1)==(I) set Drive=9	   if (%1)==(J) set Drive=a	   if (%1)==(K) set Drive=b	   if (%1)==(L) set Drive=c	   if (%1)==(M) set Drive=d	   if (%1)==(N) set Drive=e	   if (%1)==(O) set Drive=f	   if (%1)==(P) set Drive=10	   if (%1)==(Q) set Drive=11	   if (%1)==(R) set Drive=12	   if (%1)==(S) set Drive=13	   if (%1)==(T) set Drive=14	   if (%1)==(U) set Drive=15	   if (%1)==(V) set Drive=16	   if (%1)==(W) set Drive=17	   if (%1)==(X) set Drive=18	   if (%1)==(Y) set Drive=19	   if (%1)==(Z) set Drive=1a	   if (%1)==(a) set Drive=1	   if (%1)==(b) set Drive=2	   if (%1)==(c) set Drive=3	   if (%1)==(d) set Drive=4	   if (%1)==(e) set Drive=5	   if (%1)==(f) set Drive=6	   if (%1)==(g) set Drive=7	   if (%1)==(h) set Drive=8	   if (%1)==(i) set Drive=9	   if (%1)==(j) set Drive=a	   if (%1)==(k) set Drive=b	   if (%1)==(l) set Drive=c	   if (%1)==(m) set Drive=d	   if (%1)==(n) set Drive=e	   if (%1)==(o) set Drive=f	   if (%1)==(p) set Drive=10	   if (%1)==(q) set Drive=11	   if (%1)==(r) set Drive=12	   if (%1)==(s) set Drive=13	   if (%1)==(t) set Drive=14	   if (%1)==(u) set Drive=15	   if (%1)==(v) set Drive=16	   if (%1)==(w) set Drive=17	   if (%1)==(x) set Drive=18	   if (%1)==(y) set Drive=19	   if (%1)==(z) set Drive=1a	   echo ecs:100>tmp.deb	   echo 8C C8 8E D8 8E C0 B2 %Drive% B4 36 CD 21 3D FF FF 74>>tmp.deb	   echo ecs:110>>tmp.deb	   echo 59 66 F7 E3 66 F7 E1 BF 00 02 B1 0A 66 BB 00 CA>>tmp.deb	   echo ecs:120>>tmp.deb	   echo 9A 3B 66 31 D2 66 F7 F3 04 30 66 89 D6 88 05 47>>tmp.deb	   echo ecs:130>>tmp.deb	   echo 66 89 D8 66 BB 0A 00 00 00 66 31 D2 66 F7 F3 66>>tmp.deb	   echo ecs:140>>tmp.deb	   echo 89 C3 66 89 F0 FE C9 75 D9 B9 0B 00 BE FF 01 BF>>tmp.deb	   echo ecs:150>>tmp.deb	   echo 00 02 49 46 83 F9 01 74 05 80 3C 30 74 F4 83 F9>>tmp.deb	   echo ecs:160>>tmp.deb	   echo 0A 74 07 89 CA FC F3 A4 89 D1 31 DB 3D FF FF 75>>tmp.deb	   echo ecs:170>>tmp.deb	   echo 02 31 C9>>tmp.deb	   echo g=cs:100 173>>tmp.deb	   echo n space.tmp>>tmp.deb	   echo w cs:200>>tmp.deb	   echo q>>tmp.deb	   debug <tmp.deb >nul	   del tmp.deb	   echo -bytes on drive %1>>space.tmp	   type space.tmp	   del space.tmp
Debug manual

Dirk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.