dear all,
i have a question wanna to get help, for example
there is a folder, the folder’s is 5-FB030030-xxxxxxx
and there are some word (or pdf) files in this folder,
i want to change the all the file’s name in this folder, the change approach as follows
the 20191011_001000_xxxxxx.docx file’s name is changed to
CN_50570000_001000_FB030030_20191011.docx
the 20191024_000984_xxxxxxxxxx.docx files name is changed to
CN_50570000_000984_FB030030_20191024.docx
how could i deal with problem ? anybody could give me a demo code ?
@Chris-Yiwei -
take a variable to set the file name…use filename.Split(“_”), this will split the filename…then assign newfilename variable to CN_50570000_arr(2)_FB030030_arr(1).docx
then you can use MoveFile actiivty and change the filename in destination path property.
You can first get the folder name with -
var = Directory.GetDirectories() function
so if you have only 1 folder then you can take that foldername and then again split and take the 2nd argument value and process it further with workflow.