Thread: Creating a directory with mkdir
Results 1 to 6 of 6
Related
-
Help on creating database Forum: Databases
Replies: 0 -
Help Creating print.css Forum: CSS Forum
Replies: 1 -
Creating Pages in HTML Forum: HTML Forum
Replies: 1 -
Creating scroll bar Forum: HTML Forum
Replies: 1
-
12-09-2006, 04:08 PM #1
Creating a directory with mkdir
Hi guys,
I'm actually using perl for simple, non-web based programming.
I'm writing a "radio" script that should create a directory using:
mkdir "/home/marvin/Multimedia/MP3s/Radio/PROBE", 0700;
but I'm getting the following error:
Unsuccessful stat on filename containing newline at /home/marvin/bin/radio line 128
I've tried Google, but I only got some MySQL related answers, I'm not using MySQL.
What's the problem? I've already checked the ACLs of that directory, they are all right.
Btw, I'm using the cygwin version of perl on cygwin.
Thanks
Merowingian
-
12-10-2006, 04:27 AM #2
Re: Creating a directory with mkdir
ummm... i havent worked with perl in a while, but i think this may be worth mentioning...
when you are setting something to a static name (ie: something that doesnt change unless changed manually), you should always use single quotes rather than double quotes to avoide confusion.
If i had to guess, i would say that perl is treating everything in the double quotes as a regular expression (but i dont believe it should be doing that).
Try chaneing those to a single quote, and if that doesnt work, try using chdir() function to change the current working directory first, then just use the directory you are freating's name insted of trying to point all the way down the line.
but honestly it should work from what i remember of perl,
-ALL
-
12-22-2006, 11:06 AM #3
Re: Creating a directory with mkdir
Nope, sorry, that didn't help.
But what's the usual cause of this "couldn't stat filename" problem?Last edited by Merowingian; 12-22-2006 at 11:19 AM.
-
01-09-2007, 09:15 AM #4
Re: Creating a directory with mkdir
I'm still having the same problem. Any solutions?
-
01-09-2007, 10:27 AM #5
Re: Creating a directory with mkdir
I've not got a solution, mainly 'cos I don't use PERL, but all the references I can find suggest it's a problem with your language settings - and the reference to a "newline" suggest to me that it's reading something as an escaped character.
-
02-09-2007, 03:43 PM #6
Re: Creating a directory with mkdir
Have you seen this?
http://alumnus.caltech.edu/~svhwan/prodScript/avoidPwdFindMkdir.html#sec3
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum