How to handle filenames with spaces?

前端 未结 7 768
后悔当初
后悔当初 2020-12-11 03:37

I use Perl on windows(Active Perl). I have a perl program to glob the files in current folder, and concatenate them all using dos copy command called from within using syste

相关标签:
7条回答
  • 2020-12-11 04:36

    In windows you can normally put double quotes around the filenames (and/or paths) allowing special chars i.e "long file names".

    C:\"my long path\this is a file.mp3"

    Edit:

    Does this not work?

    system("copy /b \"$_\"+$outfile $outfile");
    

    (NOTE THE DOUBLE quotes within the string not single quotes)

    0 讨论(0)
提交回复
热议问题