Unable to move the file from source to destination

while moving files its shows error like: file could not find a part of the path .kindly share any solutions .thanks

1 Like

@priyankavivek

Can you share your path here

You have to give upto your name like
Source:c:/users/programdata/results.xlsx
Destination : c:/users/documents/results.xlsx

Thanks,
Aman sheik

@priyankavivek

Could you please check file path once whether you passed correctly or not.

F:\ InputFiles\Invoice MailDownload\Invoice.pdf

This is your source path or destination path @priyankavivek

i have give the path as
source: F:\ InputFiles\Invoice MailDownload\Invoice.pdf
destination :
“F:\ InputFiles\InvoiceMailDownload”+"\ “+filename+variable1+”_"+variable2+".pdf"

@i think you are missing \ in one place check that @priyankavivek

can i know which place i have missed the ?

@priyankavivek can you do one thing, print this in message box. Check that path is correct or not

yes i have done that,thats what i have wrote in the destination file path here

you were right , / is occured in the variable,where the variable is the option to rename the file.

@priyankavivek

Try this once use invoke method activity

Target type : System.Io.file
Target Object: Leave Blank
Method name : Move

In Parameters you can give your both paths
In string your path (source)
In String your path (destination)

Thanks,
Aman Sheik

in destination path i have to pass a variable which contains / so it shows an error like couldnot find the part of the path

hello @priyankavivek

F:\ InputFiles\Invoice MailDownload\Invoice.pdf (source )
i think Invoice MailDownload folder has space in folder name

In destination there in no space in folder name
“F:\ InputFiles\InvoiceMailDownload”+"\ “+filename+variable1+”_"+variable2+".pdf"
so look into that

Thanks

1 Like

i have corrected that but still it shows that error,where variable 2 contains “/” ,where
we cannot change this because its the requirement,whatever values comes in the variable2 has to be its filename

1 Like

hello @priyankavivek

try this
image

Thanks

1 Like

yes i have tried with “_” but we have problem in variable2
for example variable2 = ASDF/123 we have to pass the variable2 with filename

okay got it
i think this is not possible
name of the folder and file must not contain such special character like /.""

Thanks

@Palaniyappan @Jan_Brian_Despi @lakshman you have any idea on this topic please help on this to get solution

3 Likes

replace / with underscrore(_) in variable2 could be one solution

Thanks

1 Like