Set the archive bit on files in a folder?

While viewing files on my Mac from Windows machines on my network, the archive bit seems to be set on the files in soe directories. Setting the archive bit from the Windows machine appears to work, but the bit doesn't really get reset, as a quick refresh of the directory shows.
Is there a way to (re-)set the archive bit (or any of the read/hidden/system/archive bits) for files on a drive that is neither NTFS nor FAT32? Does OS X allow for the setting of these bits?
-=b=-

The attrib command isn't a PowerShell cmdlet:
http://ss64.com/nt/attrib.html
If you're asking which line of your script this should replace, the answer is 'the entire thing'.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing)

Similar Messages

  • Question about: Use PowerShell to Toggle the Archive Bit on Files

    Hi Scripting Guys,
    thanks for you favorite scripts. but
    one question: the script abovementioned
    running. But I have to enter a -value
    for each file. If the script is not
    written so that each file checked for the archive
    and then changed? Apparently it
    does not work right with me.
    Here is the script again
    and also a screenshot. Over a short help I
    would be delighted.
    Stephan
    $path = "C:\fso"
    $files = Get-ChildItem -Path $path -Recurse
    $attribute = [io.fileattributes]::archive
    Foreach($file in $files)
     If((Get-ItemProperty -Path $file.fullname).attributes -band $attribute)
       "$file.fullname has the $attribute bit set, removing the bit."
       Set-ItemProperty -Path $file.fullname -Name attributes
       -value ((Get-ItemProperty $file.fullname).attributes -BXOR $attribute)
       "New value of $file.Fullname attributes"
       (Get-ItemProperty -Path $file.fullname).attributes
     ELSE
        Write-host -ForegroundColor blue
        "$file.fullname does not have the $attribute bit set, setting the bit."
        Set-ItemProperty -Path $file.fullname -Name attributes
          -value ((Get-ItemProperty $file.fullname).attributes -BXOR $attribute)
        "New value of $file.Fullname attributes"
       (Get-ItemProperty -Path $file.fullname).attributes
    } #end Foreach

    The attrib command isn't a PowerShell cmdlet:
    http://ss64.com/nt/attrib.html
    If you're asking which line of your script this should replace, the answer is 'the entire thing'.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • How to set the 'Configuration Bits' in the PIC16F84

    I am using the PIC16F84 in a circuit and I'm programming the assembly for the PIC.  However I can't figure out how to set the configuration bits.  For example I want to select the LP Oscillator, turn the WDT off, turn the PUT on, and turn the CP off.  Normally if I was using the IDE from Microchip I would add the line:
    _CONFIG H'3FF0'
    However Multsim does not recognize this as a valid code.  In addition the P16F84.inc file contains the following definitions:
    _CP_ON                       EQU     H'000F'
    _CP_OFF                      EQU     H'3FFF'
    _PWRTE_ON                 EQU     H'3FF7'
    _PWRTE_OFF                   EQU     H'3FFF'
    _WDT_ON                      EQU     H'3FFF'
    _WDT_OFF                     EQU     H'3FFB'
    _LP_OSC                      EQU     H'3FFC'
    _XT_OSC                      EQU     H'3FFD'
    _HS_OSC                      EQU     H'3FFE'
    _RC_OSC                      EQU     H'3FFF'
    What is the code though to select which options you want to use?

    Try this code:
    _CONFIG _CP_OFF & _PWRITE_ON & _WDT_OFF & _LP_OSC
    I tried this in the assembler and it didn't return any error messages when compiling. I found this in a PIC Book that I downloaded off the internet.
    I hope it works for you. I am new to the MCU Module and learning about it so don't consider me an expert on it by a long shot.
    Have A Nice Day
    Kittmaster's Component Database
    http://ni.kittmaster.com
    Have a Nice Day

  • How to enable the Archive faulty source file in File adapter

    Dear XI expert,
    I want to enable the Archive Faultly source file, when the exchange step detects any error then move the source file to the ERROR folder.
    I've already applied patch XI ADAPTER FRAMEWORK CORE 7.00 SP10 but haven't seen anythings about this function.
    Best regards,
    Kobsak

    Hi,
    Check out this link for info on how to archive the file.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Vikram

  • Set the password for zip file in unix

    Hi All,
    I have used the below command to zip the file and it is working fine.
    cd /YYYY;zip -r ZZZZ.zip ZZZZ.TXT
    While using the below command to set the password on zip file , I am getting error like "zip error: Invalid command arguments (encryption not supported)
    zip -P password -r ZZZZ.zip ZZZZ.TXT
    Can you please help me how to set the password for zip file in UNIX.
    Thanks,

    Do you use any characters in the password that might confuse the zip command? (like '-' or ';'?)
    If I use the command in RHEL4:
    cd /tmp
    zip -P password -r tt.zip gconfd-oracle
    adding: gconfd-oracle/ (stored 0%)
    adding: gconfd-oracle/lock/ (stored 0%)
    adding: gconfd-oracle/lock/ior (deflated 67%)

  • How to set the HomePage and FolderSize of a managed folder?

    Recently, I deside to get the FolderSize and HomePage of a managed folder throw GetFolder operation in EWS, but the FolderSize and the HomePage always not present.
    Unfortunately, I could not set these two element directly in Exchange management shell like "StorageQuota".
    I tried to create some items in the managed folder, but I also could not get the FolderSize.
    How can I do next? Is there anybody know the ways to set the HomePage and FolderSize of a managed folder?

    Hi,
    We can use the Set-OrganizationConfig -ManagedFolderHomepage command to specify the homepage. To limit the managed folder size, we can use the StorageQuota parameter with the New-ManagedFolder command.
    Here is a related article about the Set-OrganizationConfig command for your reference.
    Set-OrganizationConfig
    http://technet.microsoft.com/en-us/library/aa997443(v=exchg.141).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Is there a way to clean the javascript cache of files in layouts folder?

    Is there a way to clean the javascript cache of files in layouts folder?
    If I deploy a new version of the solution after some changes in javascript file which is deployed to the layouts folder the old version is used. The only fix I have found so far is to change the URL of the javascript file with some fake querystring like
    "?v=2". But this requires another deployment. So I am asking for an alternative approach.

    hi Nikolay,
    there is no clean solution for your problem. Browsers cache files by url, you can avoid caching appending in query string unique value per deployment. For example
    _layouts/my_js_file.js?v=<current date> - will be refreshed from cache when day changes
    _layouts/my_js_file.js?v=<GUID> - if guid is generated on every request, this file should never cache
    _layouts/my_js_file.js?v=<product version> - more preferable solution, browser will update cache on every new version that was deployed
    Actually, ScriptLink should take care about this, internally it has a method that appends unique id into query string based on js file content, if content changed, hash is also changed and new unique id is generated.
    Check Below link for more information
    http://sharepoint.stackexchange.com/questions/57874/how-to-avoid-caching-issue-when-using-custom-javascript-and-css-deployed-under
    You can also check this link
    http://www.sharepointnutsandbolts.com/2011/11/avoiding-bugs-from-cached-javascript.html
    Please mark the Answer and Vote if it will help to resolved your issue

  • Setting the sticky bit on a file fails in a zone

    On initial inspection, the sticky bit on directories seem to be consistent across both the Global zone and local zone. However, they are inconsistent for files. Is this a bug, and if it is how to I raise a defect report?
    Excerpt from chmod man page:
    If a regular file is not executable and has {stick bit} set, the file is assumed to be a swap file. In this case, the system's page cache will not be used to hold the file's data. If the {stick bit} bit is set on any other file, the results are unspecified.
    Solaris 10 update 4 (Global Zone).
    # uname -a
    SunOS mumble.amtest.com 5.10 Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T1000
    # chmod 1777 testfile
    # ls -l testfile
    -rwxrwxrwt 1 root other 0 Jul 11 14:24 testfile
    # chmod 1770 testfile
    # ls -l testfile
    -rwxrwx--T 1 root other 0 Jul 11 14:24 testfile
    # chmod 1000 testfile
    # ls -l testfile
    ---------T 1 root other 0 Jul 11 14:24 testfile
    Solaris 10 update 4 (Local Zone)
    # uname -a
    SunOS qatamos-z1 5.10 Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T1000
    # chmod 1777 testfile
    # ls -l testfile
    -rwxrwxrwx 1 root other 10 Jul 10 14:59 testfile
    # chmod 1770 testfile
    # ls -l testfile
    -rwxrwx--- 1 root other 10 Jul 10 14:59 testfile
    # chmod 1000 testfile
    # ls -l testfile
    ---------- 1 root other 10 Jul 10 14:59 testfile

    It isn't the fact that the bit isn't set. I guess the biggest complaint is that there is no error when trying to set the bit.
    chmod returns success, even though it failed to set the bit.
    Normally, if someone does not have enough privileges to modify permissions on a file, an error is returned.

  • Can i automatically set the timestamp of a file based on part of its filename?

    I have a bunch of files (approx. 500) with the same name pattern, that is : name_CreationDate.pdf. For instance: invoice015_2013_06_25.pdf or invitation035_2012_11_30.pdf. The last 10 digits are always the creation date. The original timestamps of the files have been messed up by a batch application which set them all to the same day; therefore they mean nothing anymore.
    Is there a way to automatically set the timestamp (for instance the "Creation Date" one) to the date indicated in the filename? I was thinking of Automator or some kind of shareware/freeware. Does anyone of you have an idea about this? Ideally as a batch rather than individually.
    Thanks,

    Thank you for your script. I made a test based on your script:
    a) I copied a PDF file on my desktop and named it "URSAFF 1er trim 2012_1998_09_19.pdf". The date component I want to set ultimately is therefore 1998_09_19.
    b) I created a service in Automator and pasted your script in a "Run a Shell Script" command. I added the Get Specified Finder Items at the beginning to be able to test the script on the file from Automator. (See screen shot of Automator below)
    c) The script appears to run successfully but I don't see a change in the timestamps of the file after I display Get Info from the Finder. (See screen shot of Get Info after I run the shell script)
    I wonder if my Region settings (I am based in France) do not interfere with the date/time string layout compatible with touch in your script. Just in case, I have added a capture of these settings.

  • Is there a way to set the aspect ratio or file type in the camera for video settings?

    I always convert my .MOV videos to WMV so I can upload to my web site.  However, with my new iPhone (iOS7), the vidoes are distorted due to aspect ratio issues.  I'd like to set the output aspect ratio and.or file type when I create a new video on my iPhone 5s.

    There is no user setting for this in the native iOS app. It is possible that if you use some other 3rd party app you can make some changes to that, but I'm not sure. There are also no settings for changing the file type on the phone itself.
    I've not experienced any issues with distortion on mine, but it could be your converter. Have you tried another one?

  • Error during the archiving of pdf files.

    Hi all,
    We need to retrieve the PDF stored in the unix path to archiv link. For that we have written a code to store the pdf files in a  particular path to an internal table. Then we need to do  archiving. For that we first used the ARCHIV_METAINFO_GET and we got the archiv informations . Then we have used the ARCHIVOBJECT_CREATE_FILE  funciton to archive the file in the archive link. For that we have passed the parameters as follows
    ARCHIV_ID = T1
    DOCUMENT_TYPE = PDF
    PATH = /FULLUNIXPATH/CAMP.PDF
    but we got an error message as
    Error when uploading file.  FILE_OPEN_ERROR.
    How to fix this issue.
    Can any one help me please.
    Thanks
    Renuka.

    Resolved

  • Setting the name of a file to be uploaded

    I'm having trouble setting the name that my uploaded files get when they are saved on my server. I upload the files useing the following:
    <html>
    <head>
    <title>File Upload</title>
    </head>
    <body>
    <%@ page import="java.io.*" %>
    <% if (request.getContentLength() <= 1)
    { %>
         <form method=post enctype="multipart/form-data">
         <input type=file name="file">
    <input type=submit value="Submit" name="Submit">
    <input type="text" name="fileName">
    </form>
    <%
    if (request.getParameter("Submit") != null)
    out.println(request.getParameter("file"));
    else
    String contentType = request.getContentType();
    String tempFieldType = request.getParameter("fileValue");
    if ((contentType != null)&&(contentType.indexOf("multipart/form-data") != -1))
    try
    ServletInputStream sis = request.getInputStream();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int length = request.getContentLength();
    int read = 0;
    if (length != -1)
    for(int i = 0; i < length; i++)
    read = sis.read();
    baos.write(read);
    sis.close();
    String data = baos.toString();
    String origData = data;
    int boundaryStart = contentType.indexOf("boundary=");
    String boundary = contentType.substring(boundaryStart,contentType.length());
    boundary = boundary.substring((boundary.indexOf("=")+1),boundary.length());
    int gifStart = data.indexOf("\r\n\r\n")+4;
    int gifEnd = data.indexOf("--"+boundary,gifStart);
    File file;
    String filename = request.getParameter("fileName");
    out.print(filename);
    while(true)
    if (data.indexOf("image/gif") != -1) filename = filename+".gif";
    if (data.indexOf("jp") != -1) filename = filename+".jpeg";
    file = new File("C:\\"+filename);
    if(!file.exists())
    break;
    PrintStream pr = new PrintStream(new FileOutputStream(file));
    pr.write(baos.toByteArray(), gifStart, gifEnd-gifStart);
    pr.close();
    baos.close();
    catch(Exception exp)
    { out.println(exp); }
    %>
    </body>
    </html>
    I think my problem is in the <form method=post enctype="multipart/form-data"> this method is not letting me get the updated values of the text box fileName.
    Does somebody know how do get these values?
    thanks for you help,
    snnkmtt

    try to use jspsmartupload and see this post
    http://forum.java.sun.com/thread.jsp?forum=45&thread=81638&start=0&range=100
    thank you
    looking for ur solution
    all the best
    yours
    rajesh
    [email protected]

  • Setting the values inside xml file in xmlparsing

    Hi,
    Iu2019ve an xml file without containing any values inside the tags. I need to get the values from the text file and set the values inside the xml file. When I try to set the string variable inside the setValueNode()  using DOM parser, itu2019s not setting any values inside the xml file. 
    Please help me on this..
    Regards
    Vineela

    Hi,
    I am doing conversion from EDIFACT format to xml format.
    I am writing this code using core java. So I am using xmlparsing to convert my data. Iu2019ve one Hash table with me. I need to get the values from there and populate those values into xml file.
    Regards
    Vineela

  • How can I set the SRQ bit on GPIB with LabView ?

    Hello,
    I am developping an application with LabView RT on a PXI RT system. This application acts as an instrument (non controller GPIB), and I need to assert the SRQ line. How can I do that ?
    I know the ibrsv function, but I can't find it in LabView, and I can not use it through a DLL call since GPIB DLLs are not compatible with Real-Time.
    Thank you.

    Hello Alfonso,
    It sounds like you might be getting errors -200279 and -200278.  (In the future, if you post the actual error codes, it helps us to know exactly what is happening).  Error -200279 happens when you are performing a hardware-timed acquisition (meaning the data is sampled according to a clock signal on your board), but your LabVIEW program is not reading the values from the buffer allocated for that task in computer memory fast enough.  Basically it's a buffer overflow error.  It means older samples have been overwritten before you attempted to read them out.  As the error message suggests, "increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem."  For more information on this error, please see the KB (DAQmx) Error -200279 During a Continuous, Buffered Acquisition.
    Error -200278 happens most often when you have configured a finite acquisition, but are calling the DAQmx Read function in a loop.  If you want to perform a finite acquisition, you should only call DAQmx Read once.  For more information on this error, see the KB Error -200278 at DAQmx Read.
    Finally, please refer to Abhinav's earlier post about the sample rate on the 9237 module.  As he described, the NI-DAQmx 8.3 driver will only allow you to set the sample clock to integer divisions of 50k (50,000/n, where n can be 1, 2, 3...13).  Since the maximum divisor is 13, the smallest sample rate that can be used is 3.846 kS/s.  You can check what value the driver is actually using for the sample clock by reading from the SampClk.Rate property of the DAQmx Timing property node.
    I hope this helps!  Let me know if you have any questions about what I've described.
    Best regards,

  • Archiving Processedor Errored Files on FTP folder-Receiver File Adapter

    Hello,
    A quick question, we have a scenario where we are picking a file from FTP folder and we need to archive it on the
    1) Processed file on the same FTP server different folder
    2) errored file on different FTP folder.
    How could we achieve this using the FILE Adapter?
    As what i could see the file adapter does not gives you the option to select the FTP site for this...
    Help is appreciated.
    Regards

    To archive source files where a permanent error occurred during processing, select Archive Faulty Source Files.
    A permanent error occurs either during the conversion of the file content, or in a module in the module processor.
    More information: Adding MessageTransformBean in the Module Processor
    u25CB       Specify Error Archive Directory.
    u25CB       To add a time stamp to the archived file, select Add Time Stamp.
    ref: http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/655453b48a4ddfe10000000a1553f7/content.htm

Maybe you are looking for

  • HP Officejet Pro 8600 not able to connect to internet ip setting disabled

    My printer has been connected and working in wireless mode for 2 months. now not able to connect and printer is locked and shows "IP no link".

  • Mac mini wont boot os x

    My mac mini will not boot into os x. When I boot up the mac mini it network boots. I went into os x using the option key and changed network boot to my hard drive in system preferences, but I still get the same problem. When I type mac-boot in the fi

  • Software Development Management- How?

    Hi There, Does anyone know of a good way to manage software development (in Labview)? I've been the only programmer in Labview at my company, so tracking software changes wasn't too bad. We recently hired a couple of engineers who also program Labvie

  • More than one hierarchy in a dimension

    Hi, I'm doing my first steps into Oracle BI and came now to the point to design a Business Model. My star schema model is defined and implemented with OWB. It contains dimensions with two ore more hierarchies, using partially the same levels and spli

  • Automatic install only 4 components on Windows

    From setup.bat we have: Windows\setup.exe /v"/Liwrmoeau! %temp%\SUNJavaES.log MAINJES=Yes" %1 %2 %3 Is it possible to 'automatically' select /install only 4 components : Directory Server, Administration Server, Web Server and Access Manager? Automati