Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: filenames with spaces causing problems

by tedrek (Pilgrim)
on Jul 11, 2003 at 16:21 UTC ( #273460=note: print w/replies, xml ) Need Help??


in reply to filenames with spaces causing problems

how do you actually move the files? if you are using a shell command to do move them, it is possible that you are running into the same token problem as people have pointed out for your input. Could you please post your 'move' sub to help find the problem.

  • Comment on Re: filenames with spaces causing problems

Replies are listed 'Best First'.
Re: Re: filenames with spaces causing problems
by drake50 (Pilgrim) on Jul 11, 2003 at 17:51 UTC
    sub mv_files{ my ($file,$disc)=@_; print "moving $file to disc$disc/$file\n"; if ($doit == 1) { print "truely moving $file to disc$disc/$file\n"; move($file, "disc$disc/$file") or warn "move $file to +disc$disc/$file failed: $!\n" } }
      As many of the posts have been mentioned, using `ls`, files with spaces will be split into multiple tokens. If you use any of the suggestions from above to actually read in the lists of files to use (ie, do it from in perl, use * globbing, use find), then $file will contain the correct data.

      On this line,

      move($file, "disc$disc/$file") or warn "move $file to +disc$disc/$file failed: $!\n"

      What error is it printing out, and where does move() come from, ie. which module. Or if you wrote it your self what does sub move {.... look like?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://273460]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-09-28 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?