Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Move file with space in the filename - SM49

Former Member
0 Kudos

Hi,

I am using operating system command, MV, to move files across directories in application server. If the filename has spaces, this move fails. Can you please tell me if any escape character can solve this issue? I have already tried using backslash, single and double quotes.

Thanks,

Hema

4 REPLIES 4

andreas_mann3
Active Contributor
0 Kudos

here's the solution:

http://www.freebsd.org/cgi/man.cgi?query=file&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&format...

The one significant difference between this version and System V is that

this version treats any white space as a delimiter, so that spaces in

pattern strings must be escaped. For example,

>10 string language impress (imPRESS data)

in an existing magic file would have to be changed to

>10 string language\ impress (imPRESS data)

hope that helps

ThomasZloch
Active Contributor
0 Kudos

Depends on the OS, for Unix I believe the ` is being used to combine a string that includes spaces.

Not sure how this thingy is called in English.

Thomas

0 Kudos

I think ` is called 'tilde'. That does not work either. Nor does the '\'.

The OS is AIX. I'm still searching for an escape character!

Thanks,

Hema

0 Kudos

tilde is ~ as far as I know.

I did not mean ` as an escape character, you should try including your file name inside two of these:

`I CONTAIN SPACES`

Thomas