How to rename a folder during runtime

I have one value in excel…during run time i have to create a new folder and rename that folder with the value which i got from the excel cell.

Hello!

You just have to loop through the Excel file and use the “Create Directory” activity to create the folder with the value of the excel assigned to a variable.

Something like this:

image
image

Hope it Helps!

Regards,

I think this can be achieved by 4 steps:

  1. Create a 1st folder using Create directory.
  2. Create 2nd folder using Create directory with the excel value as the name.
  3. Move the files from folder 1 to 2.
  4. Delete the folder 1.
1 Like

Hi,
this procedure is not working bro in my system…

Use below method in Invoke Method Activity

System.IO.Directory.Move

Reference Link

image

3 Likes

@akhi_s27,

thank you bro

Thanks @Lucas.Pimenta :slightly_smiling_face:
its working

1 Like

Hi @Lucas.Pimenta
In excel sheet…I have to move column E to before column C…Means insert cut cells operation…
I have to cut column E and at column C i have to do insert cut cells.
i done that using recording…but it is working sometimes and sometimes it is taking another column…is any other alternative method for doing this.

Hey @Ananthaeswar2

For new question please prefer to create new thread

You can Use Excel Application Scope activity to get data from excel into a Datatable and then by using Setordinal() method you can change the columns order.

Like for yours:
dataTable.Columns[“E”].SetOrdinal(2);
dataTable.Columns[“C”].SetOrdinal(3);

Note- For Sample Workflow search on forum you will find plenty of resources here on this :slight_smile:

Regards…!!
Aksh

Thank @aksh1yadav for the solution :slightly_smiling_face:
I posted that question in new thread only.but i didn’t get any reply for that.That y again i asked that question.
i didn’t find any samples regarding that…i m attaching one sample sheet. could you please help me with that.
Regards
Ananthasample.xlsx (7.8 KB)

SetOrdinal_Sample.xaml (7.6 KB)
In above sample i am changing the ordinal of gender column so it will appear before age column

Regards…!!
Aksh