473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Return Code 512 thrown when executing mkdir and copy command

Hi all,

In one of my perl scripts when i try to create a directory using mkdir (), the directory is created but the return code for the mkdir () is 512, the same is the case for copy command.

Eg:
Expand|Select|Wrap|Line Numbers
  1. my $val = /xyz/abc/dkd
  2. mkdir ($val);
  3. rc = $?
  4.  
when i print rc it is 512, but the directory is created.

Can some one tell me what does return code 512 mean?

Thanks & Regards,
GunaSeelan J
May 31 '06 #1
2 12305
Expand|Select|Wrap|Line Numbers
  1. my $val = /xyz/abc/dkd
  2. mkdir ($val);
  3. rc = $?----------------> bug  here ,  u  have  to use $rc
  4.  
Other thing is if mkdir() sucessfully created a directory.,then it returns a zero value, otherwise it returns non-zero value,Don't bother about that it's vary from os to os.
Sep 19 '08 #2
KevinADC
4,059 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. my $val = /xyz/abc/dkd
  2. mkdir ($val);
  3. rc = $?----------------> bug  here ,  u  have  to use $rc
  4.  
Other thing is if mkdir() sucessfully created a directory.,then it returns a zero value, otherwise it returns non-zero value,Don't bother about that it's vary from os to os.

Question posted by: gunaseelan_wipro (Newbie) on May 31st, 2006 11:51 AM
Sep 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Jean-Marc Molina | last post by:
Hello, I can't find a way to execute a Windows application, whose directory path contains blank spaces, from a PHP script. I also wonder if the problem happens under Linux and other OS. ...
13
by: Darren Dale | last post by:
Some time ago I asked about executing a python program or script. For windows, I was informed that the .py extension could be added to some list of executable extensions, and then I could just type...
2
by: Nicholas Walker | last post by:
I have been trying to execute a shell command from within postgresql My C Function #include <stdlib.h> #include<postgres.h> void shell_exec(text arg) {
7
by: needin4mation | last post by:
I know there is no On Error or the like in C#. But I am not sure how to make this code work when the file it tries to copy is in use, not there, etc. Here is what I have tried and when the...
35
by: Michel Sanner | last post by:
Hello, One of the greatest feature of Python in my opinion is the way the interpreter can be used to integrate a wide variety of software packages by dynamically linking them. This approach has...
14
by: dcassar | last post by:
I have had a lively discussion with some coworkers and decided to get some general feedback on an issue that I could find very little guidance on. Why is it considered bad practice to define a...
8
by: Andrew Robinson | last post by:
Are these two equivalent? Is one better than the other? I tend to go with #1 but started wondering.... Thanks, 1: using (SqlConnection cn = new SqlConnection(DataConnection)) using...
8
by: vj | last post by:
How do I do the following unix command: mkdir -m770 test with the os.mkdir command. Using os.mkdir(mode=0770) ends with the incorrect permissions. Thanks, VJ
4
by: mahdaeng | last post by:
I have a little Windows application written in C# with a SQLite back- end. I'm using the System.Data.SQLite provider. One of the features the application provides is a database back-up, which...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.