Jump to content

Include the output of 'date /t' in a command?


Termina
 Share

Recommended Posts

Hey,

I downloaded bsdtar for Win32, so I could use the backup script I'm familar with (on linux) with Windows 2000.

I need to back up some files weekly, and having a static name isn't an option; I'd just end up overwriting the package every week, defeating the purpose of of it all.

In linux, I'd give a command like this:

tar cvzf /home/user/package-`date +%F`.tar.gz /home/user/public_html

Which would generate a file called 'package-2006-04-07.tar.gz'.

However, I'm unable (with CMD) to do something similar.

echo date /t only shows "date /t"

echo `date /t` shows the same

as does "echo 'date /t'"

If anyone could point me in the right direction, I'd appreciate it. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy