Skip to Content
0
Former Member
Aug 04, 2016 at 07:26 AM

Passing filenames with spaces to OS command

57 Views

Hello,

I am facing a weird problem in which I am having a OS level command calling a shell script which copies the source file to another directory by renaming it to current date.

It accepts 1 parameter of filename with fully qualified path %F. This works fine until the filename doesn't have any spaces. If the filename contains spaces the script fails.

I know it is more of a shell scripting, however any idea how it can be resolved. I tried giving "" or including "$@" in the shell script but no luck. Actually I am doing this since we don't have any control of filename, which is archived by a file adapter. Immediate help would really be appreciated.

Regards