PDA

View Full Version : batch file help



newbie
02-14-2003, 11:25 AM
I am trying to use the (very good) batch files so I can automate using programs like besweet. I am carrying in the % and not the file name.

I spent an hour on google trying to figure out what I am doing wrong. I haven't really used batch files since the pre Win95 days. I think I need to update my config.sys and autoexec.bat files.

Can anyone using these batch files give me some ideas as to what I need to add so they work.

MrBassMan
02-14-2003, 11:42 AM
Which batch files are you trying to use.
Post the version you are using here and I will take a look at it

newbie
02-14-2003, 11:56 AM
ANY batch file that uses input variables like:
%~d1
%~p1
%~n1

I've tried 3 from these forums and even went to a batch tutorial and downloaded a "test batch file"
The %and variable is being passed to the command line instead the of the path, directory file name...

I think I'm missing a command in my config.sys/autoexec.bat. I let Windows give me stripped files. Not sure what I'm missing. Don't have Himem.sys for example.

I put in pause commands and can see what is going. on.

TyStream.bat is the one I'm trying to get to work:
The first part of the file follows:
@echo off
cd %~d1
cd %~d0%~p0%
mkdir "%~n1"
cd %~n1
cls
echo.
echo Creating a Key File for %~n1.
vsplit -k "%~d1%~p1%~n1.ty" "%~d1%~p1%~n1\%~n1.key" "%~d1%~p1%~n1\%~n1.m2a" >NUL:

echo.
echo Starting GopEditor.

GopEditor "%~d1%~p1%~n1\%~n1.key"
.....

keith721
02-14-2003, 12:50 PM
are only available on Win NT, 2K, and XP.
They are not available on Win9x/ME.

What o/s are you running ?

MrBassMan
02-14-2003, 12:51 PM
What version of windows are you using?

Windows NT only supports a subset of the %~ commands. Only Windows 2K and XP support the full set.

newbie
02-14-2003, 12:59 PM
Using Win98SE. Guess that's why it doesn't work. I'll use %1 to get the file name.

May be time to upgrade to XP, but I really don't like the whole activation process.

MrBassMan
02-14-2003, 01:03 PM
Yes %1 is supported on all versions of windows.

You can do things like:
tydemux -i %1 -a %1.m2a -v %1.m2v

Passing in test.ty as in input parameter to this would result in the command:

tydemux -i test.ty -a test.ty.m2a -v test.ty.m2v

newbie
02-14-2003, 01:09 PM
Thanks to all. I should have posted earlier, spent over an hour doing a google search looking at batch tutorials. Found all the commands but it didn't spell out which versions of windows they worked with. I thought I must have done something to my confiuration files.

Mr. BassMan--I 'll use your suggestions to re-write the batch files.
I had been editing the batch file each time I used it--your suggestion is easier.