Hello,
First of all, thanks for your excellent product. It helps to resolve a lot of FTP backup tasks in our company.
I have backup script that uses Zip program to archive data before transfer. Some of local folders have space in their names, for exampe Program Files. I couldn't execute external program in this situation because space is used as parameter delimeter. In other batches I could use quotes to pass such parameters.
So the question is how to add a quote to variable value? I tried:
$x = """
$x = "\""
But this syntax is incorrect.
Best regards,
Alex @ databaseonline.nl
First of all, thanks for your excellent product. It helps to resolve a lot of FTP backup tasks in our company.
I have backup script that uses Zip program to archive data before transfer. Some of local folders have space in their names, for exampe Program Files. I couldn't execute external program in this situation because space is used as parameter delimeter. In other batches I could use quotes to pass such parameters.
So the question is how to add a quote to variable value? I tried:
$x = """
$x = "\""
But this syntax is incorrect.
Best regards,
Alex @ databaseonline.nl
Hello Alex,
Thanks for posting, this is a very important issue and have just realised that it isn't covered in the forum.
You can use two types of quotes in a script the double quotes (most common) and the single quote. For example:
http://www.scriptftp.com/reference.php?go=topic260
Thanks for posting, this is a very important issue and have just realised that it isn't covered in the forum.
You can use two types of quotes in a script the double quotes (most common) and the single quote. For example:
Code: Select all
This is particularly vey useful for EXEC as some command line parameters need double quotes inside themselves. For example:# Example that shows how single and double quotes can be used as text string delimiters
$myfile='test.txt'
$myfile2="photo.jpg"
Code: Select all
You may find useful the remarks section of the EXEC help topic:EXEC('copy "C:\path with spaces\Report 2008.txt" C:\saved\notes.sav')
http://www.scriptftp.com/reference.php?go=topic260
liked Script FTP? Try our other product Email Parser