Reputation: 706
I try compress a folder in MATLAB using tar. I want to assign the current date as the name of the archive file. When I try
tar 'datestr(now)' FooFolder
Nothing happens. With
tar datestr(now) FooFolder
the name of the archive file is datestr(now).tar as expected. What is the solution?
Upvotes: 0
Views: 253
Reputation: 10676
The documentation is quite clear, use the function syntax:
tar(tarfilename,files)
Example:
tar(datestr(now),'FooFolder')
Upvotes: 3