codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Problems with mkdir  Merowingian at 20:17 on Saturday, December 09, 2006
 

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

  Re: Problems with mkdir  mmarab at 08:34 on Monday, December 18, 2006
 

Hi,

I have had the exact same problem with mkdir, i am also using cygwin. I have used forums before to find the answer to this problem and have failed. I hope that this problem is resolved as it would be a benifit to myself also. Sorry i couldnt help, but I thought I would let you know that your not the only one with this problem.

  Re: Problems with mkdir  javabits at 20:33 on Thursday, December 28, 2006
 

you should try the following:

mkdir -p "/home/marvin/Multimedia/MP3s/Radio/PROBE" -m 0700;

The -p will create any parent folders. Also if the folder exists already it won't cause an error. The 0700 that you had before would have created a directory named 0700, if you want to set the permissions you need the -m. The , that you had before would have been appended to the first parameter causing a directory with the ,. Hope this helps.

semper fi...

  Re: Problems with mkdir  Merowingian at 13:14 on Tuesday, January 09, 2007
 

I'm sorry it still ain't working.

I'm now getting the following message:

Number found where operator expected at /home/marvin/bin/radio line 132, near "m 0700"
(Do you need to predeclare m?)
Number found where operator expected at /home/marvin/bin/radio line 135, near "m 0700"
(Do you need to predeclare m?)
syntax error at /home/marvin/bin/radio line 132, near "m 0700"
syntax error at /home/marvin/bin/radio line 135, near "m 0700"
Execution of /home/marvin/bin/radio aborted due to compilation errors.


Don't worry, I didn't forget the "-" before the "m"

Where did you get that -p-m-syntax, anyway? I couldn't find it anywhere, all I could find was the one I used before.

  Re: Problems with mkdir  javabits at 19:33 on Wednesday, January 10, 2007
 

I'm using a fairly recent gnu version of mkdir (i.e. linux or cygwin). You might have an older version of mkdir, so you probably should check the documentation on the system you are working on. You should try typing

for unix/linux
man mkdir
or
mkdir --help

for windows
mkdir /?

semper fi...














CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Digital.Canal.Software.V2013
•  Altair_HyperWorks_12.0.1_Win64
•  Global.mapper.V15.0
•  ESI.PAM-RTM.V2010.0
•  KISSsoft.03.2013E.SP5
•  Technical.Toolboxes.Pipeline.Toolbox.2013.Enterprise.v15.0.0
•  Simprotek.Simprosys.V3.0
•  Ricardo.SABR.V6.0p1
•  PSIM.V9.2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013