i have a bat file that runs pkzip to zip up files from a particular directory and move them somewhere else. I have this working by specifying the exact directory in the bat file but rather than have multiple bat files I want to know if i can modify the bat file to pick up the name of the directory the files are in and use that name to name the zip file.
eg i have files under d:\sys\database1\ and d:\sys\database2\
i would like to run a bat file that zips up the contents of database 1 and names the file database1.zip.
Also when picking up files to zip up is it possible to exclude a file type? I would like to zip up everything apart from a certain file type?