GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone remember batch file programming in DOS? (https://gfy.com/showthread.php?t=554844)

RayVega 12-20-2005 08:08 PM

Anyone remember batch file programming in DOS?
 
Anyone here remember how to write a DOS batch file? need to run a dos app like this

executable input file output file
program.exe oldsong0001from_PS new_track01.mp3

I have over 80 tracks and would love to run a single batch to grab all .adx's in the directory and convert them to a numbered mp3 fil. So i dont have to type em individual.

Just cannot dig up the little folder in my brain that remembers dos commands or batch files...aaaaaarghhh

Fred Quimby 12-20-2005 08:12 PM

10 print "Fred Quimby"
20 goto 10

ChrisAnubis 12-20-2005 08:17 PM

Quote:

Originally Posted by Fred Quimby
10 print "Fred Quimby"
20 goto 10

Nice Fred, except that is BASIC, not batch programming.

For your batch programming, you would need to know if the actual program can run command line parameters, and if it would allow batch to continue running. I am not sure about the renaming of your files, would have to be built into the program I believe, since batch basically (Hey Look Fred-BASIC) runs dos commands and command line program functions.

I MAY be mistaken though. I never said I was a programming expert.

sfera 12-20-2005 08:20 PM

i remember it, ppl still use them now and then

BillPMB 12-20-2005 08:44 PM

Something like this might work.

@echo off
ren *.adx *.mp3
set Count=0
dir /b | findstr "[0-9][0-9].mp3" > tmp1.txt
sort tmp1.txt /+5 > tmp2.txt
for /f %%a in (tmp2.txt) do (call :incr
call :ReNumber %%a %%Count%%)
erase tmp?.txt *.tmp
exit /b
:incr
set /a Count=%Count%+1
goto :eof
:ReNumber %1 %2
if exist %1 (echo renamed %1 Old%2.mp3
ren %1 %1.tmp
ren %1.tmp Old%2.mp3) else (echo renamed %1 Old%2.mp3
ren %1 Old%2.mp3)
goto :eof

You may have to do some tweaking, but that'll get you close.

mikeyddddd 12-20-2005 08:45 PM

Something like this:

create the process bat file

program.exe %%x.adx %%x.mp3

Run this command for each folder

lfnfor off
for %%x in (drive:\folder\*.adx) do call process.bat %%x

It's been awhile

And you got another answer while I replied

sickbeatz 12-20-2005 08:47 PM

program.exe < input file > output file

sickbeatz 12-20-2005 08:48 PM

Quote:

Originally Posted by sickbeatz
program.exe < input file > output file

nevermind i thought you trying to do I/O from STDOUT/STDIN

Fred Quimby 12-20-2005 09:33 PM

Quote:

Originally Posted by ChrisAnubis
Nice Fred, except that is BASIC, not batch programming.

For your batch programming, you would need to know if the actual program can run command line parameters, and if it would allow batch to continue running. I am not sure about the renaming of your files, would have to be built into the program I believe, since batch basically (Hey Look Fred-BASIC) runs dos commands and command line program functions.

I MAY be mistaken though. I never said I was a programming expert.

Do you want the fast way or the right way?





thats what my dad always told me

Fred Quimby 12-20-2005 09:34 PM

I usually chose the fast way

reed_4 12-20-2005 11:22 PM

Damn, I forgot those DOS commands. :(


All times are GMT -7. The time now is 09:39 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123