Gossamer Forum
Home : General : Perl Programming :

Passing Variable with a space

Quote Reply
Passing Variable with a space
I am trying to pass variable D:\\Data Files\\Invoice to $PATH when I execute robocopy with the variable $PATH robocopy states that d:\Data is not a valid source. How can I pass this variable so Data Files is considered one word???



Thanks for the help,
Quote Reply
Re: [Rocky99] Passing Variable with a space In reply to
$PATH = 'D:\\Data Files\\Invoice'

Unsure ?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Passing Variable with a space In reply to
I've tried that and this is the output I get:

Started : Thu Dec 18 09:38:27 2003

Source - D:\Data\
Dest - D:\Backup\Files\

Files :
Options : /TEE /S /E /COPY:DAT /PURGE /MIR /R:4 /W:2

------------------------------------------------------------------------------

ERROR : Invalid Parameter #7 : "d:\Backup\Invoice\12.18.03\SQL"

The source is supposed to be D:\Data Files\Invoice and the Destination is supposed to be d:\Backup\Invoice.
Quote Reply
Re: [Rocky99] Passing Variable with a space In reply to
Stabbing in the dark here.... but could you do

Data+Files ?
Quote Reply
Re: [Watts] Passing Variable with a space In reply to
I worked around the problem by giving it the 8.3 name and the script works fine under Windows.