473,796 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Return Code 512 thrown when executing mkdir and copy command

1 New Member
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 12352
erpritish
2 New Member
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 Recognized Expert Specialist
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_wipr o (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
6697
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. Working dir : "C:\test copy" "copy.php" PHP script : <?php
13
2286
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 "mycode" instead of "python mycode.py". Great advice, worked like a charm. I recently jumped ship, and have been running Gentoo Linux for about two months. Is it possible to get the same behavior on Linux? I thought it would have something to...
2
6799
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
1835
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 exception is thrown the listbox updates, but the program just dies. I want it to go to the next file in my list. Thank you for any help: private void btnCopyFiles_Click(object sender, System.EventArgs e) { try {
35
2898
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 been extremely successful for us so far but now I run into a license nightmare. Some the libraries we wrapped using SWIG are under GPL but the applications we are distributing are not (mainly because
14
3482
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 public member with a return type that is derived from System.Exception? I understand the importance of having clean, concise code that follows widely-accepted patterns and practices, but in this case, I find it hard to blindly follow a standard...
8
3380
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 (SqlCommand cm = new SqlCommand("ItemCount", cn)) { cm.CommandType = CommandType.StoredProcedure;
8
24534
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
7972
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 just basically copies the S3DB file to a specified location. See the code below: //------------------------------------------------ System.IO.File.Copy(srcPath, destPath, true); //------------------------------------------------
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10461
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10190
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6796
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.