Directory and Date + name

Dear all.

I’m struggling with 2 subjects. For the start of a proces i need to create a directory in a directory the first directory shoud be Now.AddMonths(0).ToString(“yyyy.MM”)) afther that i need to add a directory in the directory i created in the start of the process.

Next subject i need to download a file and name it Now.AddMonths(0).ToString(“yyyy.MM”)) + administration but i keep getting an error when i type this.
Can anyone help me with this problem

what is the error you are getting and in which of date that you want to create the directory?

the directory is the start of the i create a directory using “NL05\Administration”+Now.AddMonths(0).ToString(“yyyy.MM”)) afther that i need to add in the directory i created for example 2019.06 in that directory i need to add directory called BC reports

for the file name im trying this (+Now.AddMonths(-1).ToString(“yyyy.MM”))+ “NL05 AD.2.3 Customer Balance v.03 (Tabsheet 18)” but it shows a complier error

you are constructing the path right so use Path.combine() property

And because i have to this every mothn i can judt type in the moth and year i need to use formules

How am i suppose to do that create 2 variables one for the date and one for the name?

let say path = c:\downloads\

let say in that you want to create the file as you said above so month is changing every time
month = 1
path.combine(path,Now.AddMonths(month).tosString(“yyyy.MM”),“NL05 AD.2.3 Customer Balance v.03 (Tabsheet 18).Extesion”)

this will construct path as c:\downloads\2019.06\L05 AD.2.3 Customer Balance v.03 (Tabsheet 18).txt

and check manually whether you are able to create manually or not
then using this path you can create the file

1 Like

Do i need to do the same thing for the file name

yes this for file i think you are able to creating folders but not files in that folders

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.