Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%aecho taskkill.exe /im gmw5.exe /f>>%pr%.%%aecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a >>%pr%.%%aecho exit>>%pr%.%%a)
empty files?what do you want the files to contain?
I try again :
Where prefix = pepeand 800 goes from 800 to 899 corresponding to the name of the batThat is : pepe.800.bat -> pepe.800....................................... ................ pepe.899.bat -> pepe.899
@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a.bat >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a.bat >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
oh my, i should of fixed that, Code: [Select]@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a.bat >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
I'm trying to understand why multiple batch files are even necessary.
Esgrimidor, what do you need 100 batch files for anyways? 1 file, about 10 lines, and a good for loop can probably do what all these files would do..and really, this is confusing me,here you goCode: [Select]@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%aecho taskkill.exe /im gmw5.exe /f>>%pr%.%%aecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a >>%pr%.%%aecho exit>>%pr%.%%a)
sorry, i mean the extensions it is being output to is not in batfollowing your..."requests"this is it:Code: [Select]@echo off:beginset pth=echo.set /p pth=Path of folder: if not exist "%pth%" (mkdir "%pth%"goto :PRE)echo.echo ERROR: Folder existsgoto :begin:PREset /p pr=Prefix for files: echo.echo IF THE PREFIX CONTAINS INVALID CHARACTERS, FILES WOULD NOT BE CREATED.pausecd /d "%pth%"for /l %%a in (800,1,899) do (echo @echo off>%pr%.%%a.batecho taskkill.exe /im gmw5.exe /f>>%pr%.%%a.batecho Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%pr%.%%a >>%pr%.%%a.batecho exit>>%pr%.%%a.bat)
@echo offset /p prefix=Enter Prefix:for %%d in (0, 1, 100) do (set /A i=%%d+800taskkill.exe /im gmw5.exe /fY:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p: /m:Y:\GoldminePrg\Macros\%%prefix.%%i.bat)exit