Opened 12 years ago

Closed 12 years ago

Last modified 3 years ago

#17 closed defect (invalid)

Wildcard XCOPY operations interrupted when quotes are present in filenames

Reported by: Lewis Rosenthal Owned by: Steven Levine
Priority: minor Milestone: Version-3.09
Component: Base Version: 3.08
Keywords: Cc: steve53@…, lgrosenthal@…

Description

Command line under 4OS2 3.08 & result:

[j:\images] xcopy g:\temp\*.pdf .

Source files are being read...

SYS1186: XCOPY cannot access the source file.
Source files are being read...

SYS1186: XCOPY cannot access the source file.
Source files are being read...

SYS1186: XCOPY cannot access the source file.
Source files are being read...

G:\temp\Federal 941 3Q 2012 Employer's Quarterly Federal Tax Return.pdf

1 file(s) copied.

Run under CMD:

[J:\images]xcopy g:\temp\*.pdf .

Source files are being read...

G:\temp\Federal 941 3Q 2012 Employer's Quarterly Federal Tax Return.pdf
G:\temp\Virginia VA-5 2012-09 Employer's Return of Income Tax Withheld.pdf
G:\temp\Virginia VEC-FC-20 3Q 2012 Employer's Quarterly Tax Report.pdf
G:\temp\Virginia VEC-FC-21 3Q 2012 Employer's Quarterly Payroll Report.pdf

4 file(s) copied.

Command line under 4OS2 2.08 (again), with quotes around the wildcard spec:

[j:\images] xcopy "g:\temp\*.pdf" .

Source files are being read...

G:\temp\Federal 941 3Q 2012 Employer's Quarterly Federal Tax Return.pdf
G:\temp\Virginia VA-5 2012-09 Employer's Return of Income Tax Withheld.pdf
G:\temp\Virginia VEC-FC-20 3Q 2012 Employer's Quarterly Tax Report.pdf
G:\temp\Virginia VEC-FC-21 3Q 2012 Employer's Quarterly Payroll Report.pdf

4 file(s) copied.

(COPY works as expected with the wildcard and no quotes, successfully transferring each file.)

Unfortunately, it's not always possible to know when one may encounter stray quotes in filenames, particularly when files have been created on other platforms or by people who are not aware of the implications of such things on the command line. This means that until/unless this issue is addressed, it is always necessary to surround wildcard paths in quotations or use COPY instead of XCOPY (not sure offhand what other commands might be impacted by this).

Change History (10)

comment:1 by Lewis Rosenthal, 12 years ago

Other odd behavior with wildcards possibly related:

[j:\images] del g:\temp\*.pdf .
Deleting G:\temp\Federal 941 3Q 2012 Employer's Quarterly Federal Tax Return.pdf

Deleting G:\temp\Virginia VA-5 2012-09 Employer's Return of Income Tax Withheld.
pdf
Deleting G:\temp\Virginia VEC-FC-20 3Q 2012 Employer's Quarterly Tax Report.pdf
Deleting G:\temp\Virginia VEC-FC-21 3Q 2012 Employer's Quarterly Payroll Report.
pdf
J:\Images\va\Docs\Vienna\2012\* : Are you sure (Y/N)? N
     4 files deleted

Not sure why the "*" was processed separately following *.pdf.

comment:2 by Steven Levine, 12 years ago

Cc: Lewis Rosenthal added
Owner: changed from somebody to Steven Levine
Status: newassigned

Hi Lewis,

I very much doubt this is a 4OS2 issue. I cannot replicate the behavior you describe here. Perhaps you have defined an xcopy alias?

Without something that causes 4OS2 to invoke something other than xcopy.exe, the parameters are passed unsullied to xcopy.exe.

comment:3 by Steven Levine, 12 years ago

Cc: steve53@… added; Lewis Rosenthal removed

comment:4 by Steven Levine, 12 years ago

Cc: lgrosenthal@… added

comment:5 by Lewis Rosenthal, 12 years ago

Interesting.

No, I have no alias assigned for xcopy. Thinking further...

The above operations were against a Samba share. I'll test locally with those same files and see what I get.

comment:6 by Lewis Rosenthal, 12 years ago

Nope. Must have been something which corrupted my environment (low shared memory? been seeing that a lot lately, to the point of not being able to save ini files at shutdown). I just tested again, with dummy files created with the same names, xcopy from local directory to local directory, xcopy local directory to Samba share, and xcopy Samba share back to another local directory all work without complaint.

Let's close this as invalid. Sorry for the red herring!

comment:7 by Lewis Rosenthal, 12 years ago

PS - I tested against the exact same Samba share.

comment:8 by Lewis Rosenthal, 12 years ago

This turned out to be a Novell problem on the NSS volume. Other weird things started happening on the same volume (inability to save long filenames, among other things). A pool verify came up clean (nss /poolverify), and a subsequent restart of the server and a dsrepair pass to tighten up the directory service database (only 1 minor error), seemed to resolve the entire problem. So, this was just the first observed symptom of something else entirely. :-)

comment:9 by diver, 12 years ago

Resolution: invalid
Status: assignedclosed

comment:10 by Gregg Young, 3 years ago

Milestone: Version-3.09
Note: See TracTickets for help on using tickets.