#3152 closed Bug (No Bug)
FileCopy doesn't cope well with copying files with embedded spaces in their name to UNC destinations
| Reported by: | Owned by: | Jon | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.0 | Severity: | None |
| Keywords: | Cc: |
Description
FileCopy of a file with a full path specification and included spaces in the filename to a destination specified as a UNC path will fail. Note that if no path specification is supplied in the source string, FileCopy succeeds. Tried with V 3.3.12.0, 3.3.14.0, beta 3.3.15.0.
In the examples below, $temp is a folder name in the format "YYYYMMDDHHNNSS.$$$", e.g., "20151027144712.$$$"
FileCopy("C:\Temp\" & $temp & "\TestFile_1.txt", "\\SERVER\C$\Temp")
works, but
FileCopy("C:\Temp\" & $temp & "\Test File 2.txt", "\\SERVER\C$\Temp")
doesn't.
Neither does
FileCopy("""C:\Temp\" & $temp & "\Test File 2.txt""", "\\SERVER\C$\Temp")
or
FileCopy("""C:\Temp\" & $temp & "\Test File 2.txt""", """\\SERVER\C$\Temp""")
This works:
FileChangeDir("C:\Temp\" & $temp)
FileCopy("Test File 2.txt", "\\SERVER\C$\Temp")
Attachments (1)
Change History (4)
by , on Oct 27, 2015 at 3:33:45 PM
| Attachment: | FileCopyProblemCodeToReproduce.au3 added |
|---|
comment:1 by , on Apr 3, 2018 at 4:43:53 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , on Jul 23, 2020 at 8:02:04 PM
The reproducing script is wrong as a "\" is missing for the "Test File 2.txt"
I don't have access to a remote server so I can't reproduce
Please try again with the script corrected
Thanks
comment:3 by , on Aug 9, 2020 at 10:31:40 AM
| Resolution: | → No Bug |
|---|---|
| Status: | assigned → closed |
Hi,
No bug just the repro script does not override the already copied file and mor the file name should not be protected

AutoIt source code