Windows .bat help

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
akira
Prole
Posts: 9
Joined: Sun Mar 07, 2010 5:23 pm

Windows .bat help

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Windows .bat help

Post 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.
akira
Prole
Posts: 9
Joined: Sun Mar 07, 2010 5:23 pm

Re: Windows .bat help

Post by akira »

arg! Alright thanks for your help.
I appreciate it.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests