Skip to main content

Team,

I have Some issue with string with wild card,

I have a file under desired folder as "DSRSummaryReport_Sponsor_AU_2024-06-05-2.xls" 

1. "DSRSummaryReport_Sponsor_AU_" is created under String named $DSR$
2. "2024-06-05" is created under string named $vTodaysDate$
3."-2" is treated as wild card "*"

when I try to move the file from one folder to another folder using string as "D:\EP FILES BACKUP\RECON360 MOVER\OUTPUT\$DSR$$vTodaysDate$*.xls" to destination folder were not moved, (cross checked with message box action whether the file name is right or not) 

but,

when I try to move without string but using wild card function as "D:\EP FILES BACKUP\RECON360 MOVER\OUTPUT\DSR*.* to destination folder were moved ,

is there anything issue with string with wild card  functions ?

@Tamil Arasu10 can you help to address this issue?


 

Hi, I have tried using the "Copy: Desktop file" action to copy a file from one location to another with the following source file paths:

  1. C:\Users\Public\Documents\RPA\Test\$DSR$$vTodaysDate$*.xls
  2. C:\Users\Public\Documents\RPA\Test\DSR*.*

Both source file paths worked just fine for me. The robot copied the file as expected.
 

I suspect the issue might be due to a mismatch due hidden characters not visible in the message box, or perhaps confusion between hyphens and dashes. To troubleshoot, you can try the following steps:

  1. Start with the original path: C:\Users\Public\Documents\RPA\Test\$DSR$$vTodaysDate$*.xls
  2. Remove one character at a time from the variables $DSR$ and $vTodaysDate$ to identify the issue.
    • For example, change C:\Users\Public\Documents\RPA\Test\DSRSummaryReport_Sponsor_AU_2024-06-05*.xls to C:\Users\Public\Documents\RPA\Test\DSRSummaryReport_Sponsor_AU_2024-06-0*.xls and see if it works.
    • Then try C:\Users\Public\Documents\RPA\Test\DSRSummaryReport_Sponsor_AU_2024-06-*.xls, and so on.
  3. Ensure there are no hidden characters or incorrect characters like dashes (–) instead of hyphens (‐).

By systematically removing and checking each character, you can pinpoint where the issue might be.

Please mark the response as a solution if it helps you.


Dear @DATTA.KOTHAMASU ,

Thank you for your reply,

Since the date will change day by day , i was created as date string and using this, i was tried wild card character as you mentioned , but not moving  from a particular folder to FTP. ,

But when i try to move as   ( DSR*.* ) its getting  moved nicely when i try to move using string along with wild card its getting issue and not moving.


Have you used the debugger with a breakpoint on the Copy File line, and check the variable values in the Watch list?

I agree with @DATTA.KOTHAMASU that something in your string is probably using the wrong character.


Reply