Hi experts,
I have issue with write condition. for example
if folder have some excel files then delete all files
else continue process
how can i identify folders is empty or excel files?
could any one help me please?
Thanks
Abu
Hi experts,
I have issue with write condition. for example
if folder have some excel files then delete all files
else continue process
how can i identify folders is empty or excel files?
could any one help me please?
Thanks
Abu
Hi @Abubakkar
Files=Directory.getFiles(InputFilePath)
and pass this into a string variable
and use path exists activity based on the condition do the manipulations
Thanks
Ashwin S
If(strarray.count=0)
{
//Folder is empty
}
For each item strarray
{
If(item.ToString.Contains(“xls”)
{
//delete excel
}
Else
{
// continue process
}
}
@Abubakkar Array.ForEach(Directory.GetFiles(@"c:\MyDir"), File.Delete);
Thanks @aman_sheik
where can I apply it ? Assign activity or If condition?
Take Invoke Code Activity and in arguments create Argument(“String”)i.e., Your Path
in code write : Array.foreach(Directory.GetFiles(Path),Sub(x) File.Delete(x))
For your reference check below code
DeleFile_Ifexists.xaml (4.4 KB)
Hope this helps!!!
Thanks,
Aman Sheik.
Thanks buddy .
how to copy excel files and paste another folder?
which activity should I use?
could you help me please
Thanks buddy @aman_sheik
I got the error
“the target file directory is not a file”
Exception type : system.IO.IOException
Where you got this error in copy file Activity???
Yes buddy
i want to copy “macro excel” file and paste it another folder
that’s it