Create a folder by its file name


#1

Hi ,
i am having five excel files in a folder with the names : GL movement- 2018-02-01
GL movement- 2018-02-02
GL movement- 2018-02-03 and so on
Here, i need to create a folder on the basis of name (GL movement ) and move all the excels into that,
i am getting an error that file name is already exists …please, suggest me the solution
FYI,main1.xaml (14.5 KB)
GTL Movement Form - 2018-01-12.xlsx (20.7 KB)
GTL Movement Form - 2018-01-12.xlsx (20.7 KB)
GTL Movement Form_02.01.18.xlsx (43.5 KB)
find the attachments


#2

HI @skrishna,

I have modified few codes from your xaml file. now working please refer this one.

main1.xaml (15.0 KB)

Modified the regex expression.

Change the folder path before use

Regards,
Arivu


#3

exactly working as my expected output ,Thanks @arivu96


#4

Hi Arivu,
I need a small help in Excel , i have to delete the empty records , previously u have helped me out of this , but now i am having one “S.no” data in first column but the records are empty so, i need to delete the empty records on basis of “column3” . please find the attachment EXCELFILE1.xlsx (465.3 KB)

thanks in advance ,
s krishna


#5

Hi @skrishna,

you can use below code to get non empty records alone.

dt.Select("Column3<>''").CopyToDataTable()

dt.Rows.Cast(Of DataRow)().Where(Function(row) Not row("Column3").Equals("")).CopyToDataTable()

Regards,
Arivu


#6

sol.xaml (11.4 KB)
I am getting an error as Assign : Cannot perform ‘<>’ operation on System.Double and System.String.


#7

Hi @skrishna,

Refer below post,

please dont create duplicate post.

Regards,
Arivu