Move File Activity not working throws error

Hi All,

I am trying to move file from downloads to folder and trying to open using open word activity . After move file activity, the file is moved to folder but in log message it still shows its in downloads folder when actually its not there and open word activity shows blank word file.

Databricks Contract For Review_Q-30173 (666c5176cd) (4)


Log message after move file activity


@Anil_G any help on this

@dutta.marina

You are moving to iron_cladform but using file2…which is initial location so obvious you would get initial location and empty file

Use iron_cladform

Cheers

It looks like you’re not passing the correct path and filename to the Word activity. You’re just passing file_2 again, which is the old path and filename. That’s why it looks like it’s still there, because you’re creating it back in the old location. Also in your assign you’re getting the filename without extension, which isn’t going to work.

Before moving the file, set newPath to Path.Combine(Iron_Cladform,Path.GetFileName(file_2)) and then do the move, then give newPath to the Word activity.

@Anil_G

I am getting empty word file if used Iron_clad. Just the folder name is coming not file name

image

@postwick
The word file is opening now. What should I put in Save File as PDF Activity? ?

What should be in save pdf as ? Will it be same as Iron_Cladform?
image

You can put whatever you want there, it’s the path and filename where to save the PDF.

@postwick

i am getting pdf and .docx etension also. If i use file name without extension I dont see any pdf created

Hi @dutta.marina

As per your flow Iron_Cladform contains a extension .docx. And befor using Word Application Scope you are storing the filename in a variable filename_IronClad.

So in Save Document as PDF you should be passing filename_IronClad+".pdf"

This should solve your error.

Regards

@dutta.marina

What are you giving in iron_clad variable? If its a folder then a file with same name as source would be created in destination folder

If so use path.combine(iron_cladform,actualfilenamefromsource) in word scope

Cheers

@Parvathy

I tried that. Its not creating pdf neither throwing any error

Can I know what are the outputs you getting in Iron_Cladform and filename_IronClad variable @dutta.marina

Regards

@Anil_G

Is this correct? I am not getting pdf file created.

@dutta.marina

See…iron_cladform is it the filename? Or is it the folder name?

If filename in word scope use iron_cladform+".docx"

If folder use Path.Combine(iron_cladform,path.GetFileName(file2))

Cheers

@pravallikapaluri

image
image

@Anil_G

Ironclad is file name

image

image

@dutta.marina

Are you storing the Folder name in a variable

Regards

@Parvathy
In Iron_clad folder the file_2 will be moved from downloads to Iron_clad folder then the file should be converted to pdf

image


@dutta.marina

Now after these changes is it working?

Cheers

You aren’t giving it a path, so it’s saving in your project folder (same place your XAML files are). You are supposed to give it the FULL PATH AND FILENAME.

@Anil_G

No its not working