in reply to Re: Any issue with copy of file where filename contains + sign?
in thread Any issue with copy of file where filename contains + sign?

I tried this copy commands via command line and worked correct. Via perl script I am getting a problem. Similarly for zip of files, works from command line, via perl script see the problem. if ($filename_new =~ m/\+/ ) { $filename_new = $bugfixzip; my $bugfixzip = $SOURCE_DIR."/"."bugfixfiles.zip"; print "Zipping files with + sign in filename\n"; system("zip ${bugfixzip} ${filename_new}"); print "copy $bugfixzip","$WORK_DIR/$project/$version/$lang/us_source/$bugfixzip\n"; copy ("$bugfixzip","$WORK_DIR/$project/$version/$lang/us_source/bugfixfiles.zip"); system("unzip $WORK_DIR/$project/$version/$lang/us_source/bugfixfiles.zip $WORK_DIR/$project/$version/$lang/us_source/"); }
  • Comment on Re^2: Any issue with copy of file where filename contains + sign?

Replies are listed 'Best First'.
Re^3: Any issue with copy of file where filename contains + sign?
by Anonymous Monk on Apr 09, 2010 at 15:08 UTC

    If you can't read your post, what makes you think we can?

    The preview is not there to make your life harder, but to give you a chance to fix broken formatting like the post above. As it says when you submitted that:
    If something looked unlike you expected it to you might need to check out Writeup Formatting Tips.

    If you want help, don't be lazy!

      if ($filename_new =~ m/\+/ ) { $filename_new = $bugfixzip; my $bugfixzip = $SOURCE_DIR."/"."bugfixfiles.zip"; print "Zipping files with + sign in filename\n"; system("zip ${bugfixzip} ${filename_new}"); print "copy $bugfixzip","$WORK_DIR/$project/$version/$lang/ +us_source/$bugfixzip\n"; copy ("$bugfixzip","$WORK_DIR/$project/$version/$lang/us_so +urce/bugfixfiles.zip"); system("unzip $WORK_DIR/$project/$version/$lang/us_source/b +ugfixfiles.zip $WORK_DIR/$project/$version/$lang/us_source/"); }

        ++ for readability, thanks!

        If you inspect the zip file does it have a path inside? The problem might have been caused during the compression process.

        The other thing to do is try it manually from the command line. Also, see if there are any flags you need to pass to your unzip program to make it behave more like what you want

      Apologies, update added with correct formatting for code.