Page 1 of 1

Windows .bat help

Posted: Sat Sep 18, 2010 10:59 pm
by akira
I'm looking for help related to something not so lovish.

i made two .bat( and a third for game testing ). I'm actually looking for help on making them better because at this time the relove+rezip.bat is having an issue were it zips dir/+contents but i want it to only zips the contents of said dir.

unzipping doesn't have this issue.

rezip+relove.bat

Code: Select all

@setlocal
@echo off

echo ----------------------------------
echo -------Finished File Rename-------
echo ----------------------------------

rem zip -r gamesource.zip gamesource

zip -r -9 gamesource.zip gamesource\*.*

rename gamesource.zip gamesource.love

pause

echo ----------------------------------
echo --------Delete Game Source--------
echo ----------------------------------

rd /s gamesource

pause
unlove+unzip.bat

Code: Select all

@setlocal
@echo off

echo ----------------------------------
echo -------Finished File Rename-------
echo ----------------------------------

rename gamesource.love gamesource.zip

pause

echo ----------------------------------
echo ----------Finished Unzip----------
echo ----------------------------------

rem unzip gamesource.zip -d gamesource

unzip gamesource.zip

del gamesource.zip

pause

Hopefully thanks in advance.

Re: Windows .bat help

Posted: Sun Sep 19, 2010 8:04 am
by bartbes
The zip utility does it that way by default, you actually need to cd into the dir if you want to skip the dir.

Re: Windows .bat help

Posted: Sun Sep 19, 2010 8:05 pm
by akira
arg! Alright thanks for your help.
I appreciate it.