I want to save the file dynamically

Hi @Shubham_Kinge

By the usage of relative path & datetime properties, you can make the file be saved dynamically by the combination of these methods:

currentDirectory = Environment.CurrentDirectory

relativePath = "Data\Output"

fileName = "yourFileName_"+Now.ToString("dd_MM_yyyy")+".yourFileExtension"

savingLocation = Path.Combine(currentDirectory, relativePath, fileName)

Hope this helps,
Best Regards.

1 Like