Problem with move file


#1

I have a problem with the move activity

I get the message Illegal characters in path.

But there are no illegal characters in path. It happens when i put a “.pdf” string after the variable which contains the new file name.
What is the solution for this problem?

image

greetings


#2

It also happens with te copy activity

here is the test file:
PDF Hotfolder Revit extract, Rename and move file TEST 2.xaml (30.1 KB)


#3

Hey @nicostegeman,
Sorry that I can’t open the attached file…
Can you tell me what’s value of path and destination of the file…?

Best Regards,
SP


#4


#5


#6


#7

Hello Santosh

The move activity does not work when i use the two variables to name de path and file: (Folder_werken_Tekeningen_pdf+Filename_pdf_file_compleet)

But the move activity works well when i use for example “Y:\testfolder\filename.pdf”


#8

It shouldn’t be the case. We can use as many variables as we wish, it’s just a string concatenation…
Can you please check whether you’re missing any “” value between the variable? Or share the values of variables here.


#9

What are illegal characters in path? is an underscore an illegal character?


#10

testfile.pdf (57 Bytes)

it is a .txt file remove .pdf


#11

can you run the program and show the output as a message box or write line activity instead? That is a helpful first step in debugging to ensure the variables contain the values you’re expecting


#12

This is the right file remove .pdf
@Dave i run the output in a message box and the values are as axpected

write file.txt.pdf (58 Bytes)


#13

Hi,

Can you verify that your source and destination path are valid. You mentioned you are validating using a message box right? Are you able to navigate to the folder level correctly? There might be a \\ or something being added.


#14

I found the problem:

when i type in value of this activity “the needed string” in stead of the regex expression the move activity works
and i think it is because of that the expression put a white space behind the needed string
what should i change in this expression?


#15

I am searching in this text in a pdf
as you can see i want the text behind Ui_naam:


#16

Use a .Trim() method to eliminate spaces.


#17

A lot of Thanks
PD2 , Dave and @SantoshPothina
the spaces at the end of a variable was causing the problem.