Computing.Net > Forums > Disk Operating System > Date as filename when using zip.exe

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Date as filename when using zip.exe

Reply to Message Icon

Name: HrLaursen
Date: June 18, 2009 at 00:50:04 Pacific
OS: Windows XP
Subcategory: Configurations
Comment:

Hi!

I'm trying to create a zip file with the date as
name ie. 18-06-2009.zip

I believe I can do this with a variable but I don't
know how. My not working script looks like
this:

set filename = "D:\Web\" date ".zip"
zip -r -q -e -9 -S filename d:\web\Dokumenter

Hope someone can help

Thanks

-M



Sponsored Link
Ads by Google

Response Number 1
Name: HrLaursen
Date: June 18, 2009 at 00:54:57 Pacific
Reply:

Nevermind:

I fixed it with:
zip -r -q -e -9 -S "%DATE%".zip d:\web\Dokumenter


0

Response Number 2
Name: ghostdog
Date: June 18, 2009 at 03:02:51 Pacific
Reply:

you sure you want to rename your file like that? i don't know about your %DATE% variable, but if it contains "/" , then you can't create a file like that.

GNU win32 packages | Gawk


0

Response Number 3
Name: Mechanix2Go
Date: June 18, 2009 at 03:42:19 Pacific
Reply:

There is no built-in %date% in DOS.

LOL


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 4
Name: ghostdog
Date: June 18, 2009 at 04:41:06 Pacific
Reply:

he is probably using XP

GNU win32 packages | Gawk


0

Response Number 5
Name: HrLaursen
Date: June 18, 2009 at 08:46:08 Pacific
Reply:

Hi!

Yeah... sorry about that. I actually use WinXP. So it works.

Thanks anyway. :-)

-M


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Date as filename when using zip.exe

Want to use $DATE as logfile name.txt www.computing.net/answers/dos/want-to-use-date-as-logfile-nametxt/9373.html

invalid directory when using cd command www.computing.net/answers/dos/invalid-directory-when-using-cd-command/7470.html

current date as a file or directory name www.computing.net/answers/dos/current-date-as-a-file-or-directory-name/1664.html