|
|
|||||||
I want to copy to a folder and a file name with spaces. example copy from c:\temp\ordrer.pdf to "u:\net\order archive\ordrer 715204.pdf" How do I do this with kixtart COPY? Also, I cannot use COMPAREFILETIMS, if the path includes spaces |
||||||||
|
|
|||||||
The blanks are left alone when you put the file (including the path) in between quotes. This works just fine for me. Code: Break on Copy "d:\test folder\test file1.txt" "d:\test folder\test file3.txt" $rc = CompareFileTimes("d:\test folder\test file1.txt", "d:\test folder\test file3.txt") ?$rc Sleep 5 |
||||||||
|
|
|||||||
Or assign the file names to variables first. |
||||||||
|
|
|||||||
When i type it manuelly with "", then it works. But when I assign the path to a variable, then it won't accept it with "" - regardless if the path includes spaces or not. Example: $from = 'C:\TEMP\DOK.PDF' $to = '"\\filsrv\archive folder\dok 23170 PETERSEN.PDF"' copy $from $to (don't work) copy $from "\\filsrv\archive folder\dok 23170 PETERSEN.PDF" (works fine) |
||||||||
|
|
|||||||
You have quotes inside quotes, so the file name is "\\filsrv\archive folder\dok 23170 PETERSEN.PDF", not \\filsrv\archive folder\dok 23170 PETERSEN.PDF Use single or double quotes, not both. Personally, I use single quotes in kix unless I'm printing a contraction (I'm, Can't, etc), especially when calling DOS type commands that require double quotes. Glenn |
||||||||
|
|
|||||||
There is also an FAQ on using quotes when / where / why |