Question

I am using scilab and I have a file I want to copy and backup. The copied file should have the date when it was copied on its name e.g 'Read.dat' to become 'Read_12-April-2014.dat'. I only manage to copy the file but the date does not appear.

copyfile('Read.dat','Archive/Read_'dt=date()'.dat')
Was it helpful?

Solution

This seems related tot How to use the current date as name for a CSV file.

src_name_string = 'Read.dat';
dst_name_string  = 'Archive/Read_' + date() + '.dat';

copyfile(src_name_string, dst_name_string);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top