HoustonGSC
IS-IT--Management
Please excuse any text wrapping.
I have a dataset that is in the following format:
'UN.GS4P.GSRT087.GSRT087C.TXT-CST02824-' and yes the quotes are part of the filename and I cannot rename the file.
I want to perform a copy of this dataset using File::Copy to another directory with the name of E:\FTPfiles\gs@cst02824@gsrt087.txt
The problem is the single quotes in the original dataset name. I have tried escaping them such as :
$filename=~s/\'/\\'/g;
but the copy continues to fail. This is what the script command is :
copy($filename, $szNewBBSfile) == 0 or logmsg("$szBBScmd file cannot be copied: ", $?);
The final copy command looks like this:
copy(e:\FTPfiles\mainframe\datafiles\done\\'UN.GS4P.GSRT087.GSRT087C.TXT-CST02824-\', E:\FTPfiles\gs@cst02824@gsrt087.txt)
When I display $? it says the return code was 0 but I never see the destination file created.
Any ideas?
I have a dataset that is in the following format:
'UN.GS4P.GSRT087.GSRT087C.TXT-CST02824-' and yes the quotes are part of the filename and I cannot rename the file.
I want to perform a copy of this dataset using File::Copy to another directory with the name of E:\FTPfiles\gs@cst02824@gsrt087.txt
The problem is the single quotes in the original dataset name. I have tried escaping them such as :
$filename=~s/\'/\\'/g;
but the copy continues to fail. This is what the script command is :
copy($filename, $szNewBBSfile) == 0 or logmsg("$szBBScmd file cannot be copied: ", $?);
The final copy command looks like this:
copy(e:\FTPfiles\mainframe\datafiles\done\\'UN.GS4P.GSRT087.GSRT087C.TXT-CST02824-\', E:\FTPfiles\gs@cst02824@gsrt087.txt)
When I display $? it says the return code was 0 but I never see the destination file created.
Any ideas?