Accessing folders with absolute path having chars 256

Hi, while writing a program that recurses through the dirs and subdirs to find the size of folders tha abs path to the folder became > 256 chars and I got "can't access this folder; path is too long" message. please suggest any workaround for this problem except renaming the parent folders to shorten the path length.

I am working on Win2K and the part of code is :
for(int i = 0; i < listFolders.length; i++){ //throws NullPointerException here
                      if(listFolders.isDirectory()){
          mytasks.add(listFolders[i]);
          }else if(listFolders[i].isFile()){
                              size += (listFolders[i].length())/1000; //modified here- convert to KB
                              countFiles++;
          if(listFolders[i].lastModified() > max){
          max = listFolders[i].lastModified();
               fileName = listFolders[i].getAbsolutePath();
Message was edited by:
ravishakya
Message was edited by:
ravishakya

Similar Messages

  • Embedding fonts in AS3 with absolute paths

    I'm having difficulty embedding fonts in AS3. For instance,
    using absolute paths:
    [Embed(source="C:\WINDOWS\Fonts\CONSOLA.TTF",
    fontName="Consolas", mimeType="application/x-font-truetype")]
    ... I get the error message: "Error: unable to resolve
    'C:WINDOWSFontsCONSOLA.TTF' for transcoding.
    I'm hoping the backslashes are missing from the error just
    because the compiler doesn't return them, and not that it's losing
    them. I've tried various TTFs with the same result. Even tried
    copying code from the AS3 Cookbook letter for letter. :)
    Thoughts?

    I have a similar issue happening. I am using AS3 and have
    this code in my file:
    // package, import statements etc...
    // the line below is the problematic line
    [Embed(systemFont="..\\..\\..\\fonts\\arial.ttf",
    fontName="Arial (True Type)",
    mimeType="application/x-font-truetype")]
    // now declare my class
    public class ImageRotator extends UIComponent
    // etc.
    The class compiles fine but when I try to run it I get the
    following runtime error:
    "Error: Error #2136: The SWF file
    file:///C:/projects/photogallery_screensaver/bin/photogallery_screensaver.swf
    contains invalid data."
    I've tried several things including changing the location of
    the font file, using a different font file, embedding a systemFont.
    But I always get the same error.
    Help please!
    Thanks,
    Dan

  • Robohelp HTML command-line utility overwrites merged files in .hhp file with absolute paths. Any way to prevent this?

    I have a Robohelp 11 HTML project which uses merged CHM files. I have a help build script which compiles this project using the RH command-line utility. Whenever this runs, RH overwrites the names of the merged CHM files in the .hhp file to use absolute paths (even if the .hhp file is read-only!). I've searched Adobe forums and this appears to be a RH bug. In my case, it doesn't stop the project performing the merge, but it looks like it causes problems when searching the resultant parent CHM (topics matching the search simply don't show up in child projects), as the search cannot necessarily find the merged files referenced in the .hhp when someone performs the search on a different machine. I notice that if I compile via the RH UI, the .hhp entries are not overwritten. So, a workaround is to do the build manually. However, we'd like to automate our help build. Is there any way to prevent the command-line compiler overwriting the merge file entries in the .hhp?

    This was a problem with Rh9, see Item 13 at Using RoboHelp 9
    I haven't seen it reported since but maybe something at that link will help.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to get InputStream from a file with absolute path?

    Hi, guys:
    If I have file with a absolute path that may be inside/outside
    my Eclipse plugin, I want to get an InputStream from it. It just keeps giving me null for "is":
    String absFilePath = "/D:/my_dir/.../sample_file.txt";
    InputStream is = getClass().getResourceAsStream(absFilePath);
    regards,

    Don't use resource as stream if you have an absolute path, use FileInputStream.

  • Images with absolute path no longer viewed in CS3

    I just upgraded from Dreamweaver 8 to Dreamweaver CS3 - In 8
    I could put an images absolute path and view it in Dreamweaver. Now
    when I enter an images absolute path it won't show up while
    viewing....I made sure the image was uploaded to the website - past
    pages that had absolute paths to images can be seen, but new pages
    I create or if I enter an absolute path in older pages, the images
    disapear and I have to work with placeholders..... whats going on?
    Do I have to keep using Dreamweaver 8? (I don't notice any
    difference but I did upgrade the whole suite)

    Hi,
    I also noticed this problem. What I accidently discovered
    that worked for me, is that as long as the characters in the path
    were all together with "no spaces," everything worked fine. I used
    underscores to connect words. I sell on eBay as well as designing
    web sites, so I need DW to generate the code for me to paste into
    eBay's html "code box." So anyway, I would create the web page in
    my DW eBay template, and then upload it to my server. Then I would
    go back to DW, and enter the absolut path(s) for all the pictures
    to my server. As long as the path is connected with no spaces, it
    works.

  • Problem with absolute path and context using Tomcat 4

    I added the following line to my server.xml:
    <Context path="/track" docBase="track" />Now I have used absolute paths(ex: /includes/css/style.css) throughout my code and it worked when I served my application from the ROOT context but when I moved it to the /track - the paths did not include the new root context.
    So instead of looking at http://localhost/track/includes/css/style.css it still looks at http://localhost/includes/css/style.css.
    Is there any kind of setting I am missing in the web.xml or server.xml? I really would like to be able to use absolute paths relative to the context root.
    Please help! Thanks in advance.
    -Chris

    Hi,
    I am not sure what exactly you are asking but here is my shot. If one tomcat is serving more than one application then the only way for tomcat to know which application to refer is by looking at the context path. Since you have the context path of /track then it should appear in all of your urls being directed to the server (for both servlet and jsp). Since you have used absolute path in all the cases either you will have to change the absolute path or you will have to define them relative (which is a better idea) to a base dir. Hope it helps.
    I added the following line to my server.xml:
    <Context path="/track" docBase="track"
    />Now I have used absolute paths(ex:
    /includes/css/style.css) throughout my code and it
    worked when I served my application from the ROOT
    context but when I moved it to the /track - the paths
    did not include the new root context.
    So instead of looking at
    http://localhost/track/includes/css/style.css it still
    looks at http://localhost/includes/css/style.css.
    Is there any kind of setting I am missing in the
    web.xml or server.xml? I really would like to be able
    to use absolute paths relative to the context root.
    Please help! Thanks in advance.
    -Chris

  • Unable to access folders with RV082 QuickVPN

    I have an office peer-to-peer network (win 7) connected with a QNAP NAS and a RV082 router. There is no proper naming (I don't know how to implement it) so everything is access via IP.
    I managed to configure my RV082 to accept VPN connection from home via QuickVPN with cert etc and managed to ping all the running devices in the office, i.e. printers, nas, etc after connected with the office network.
    However, when I try to browse the NAS say run "\\192.168.1.5\", it says "The network path was not found". But I could ping the IP just fine but not the name, I'm not sure if adding it into my lmhost will help.
    I'm wondering if any of these has anything to do with my VPN settings? or is it my horrible network setup that is giving me the trouble. I also noticed that if i'm not on the same workgroup, when I try to browse office workgroup from Explorer/ Entire Network it will say "workgroup not accessible. You might not have permission to use this network resource..................."
    Is this more of a Windows than my VPN issue? do I need other protocols besides TCP/IP such as NWlink netbios. I only have client for microsoft network, file sharing and tcp/ip running.

    Hi Yee,
    Thank you for posting. Are you able to access shares on \\192.168.1.5 locally? If you can access the shares when you are onsite you should be able to access them using QuickVPN as well. You are correct that if you add the hostnames to the LMHosts file you will be able to access by name.
    This sounds like an issue with the NAS itself. You can check this by trying to access a shared folder on a PC. You may need to disable any antivirus or firewall software on that PC before you can access shared folders.
    Please keep us updated.

  • App.open(file) fails even with absolute path.

    Hi There,
    I am new to scripting for AE so please go easy on me.  I have these two lines in a script which is a plain text file with .jsx as the extension.
    var project = new File("C:\path\to\my\project.aep");
    app.open(project);
    So then, I go to my command line and enter this.  I should note that I added the directory containing afterfx.exe to my environment path (I am running Windows 7).
    afterfx -s myscript.jsx
    When i hit enter, AE launches, but I get an error that says:
    Unable to execute script at line 1.  After Effects error: Unable to call "open" because of parameter 1.  Path is not valid.  Path: C:\Program Files\Adobe\Adobe After Effects CS5\Suppor Files\pathtomyproject.aep
    What?!  Why does it think my aep file is within the Support Files directory?!  Is it because of the path environment variable I setup?  Any tips to force AE to find the file I specified in the new File() method?
    Thank you for any advice and your time!

    Hi,
    You need to use double backslashes in the path, like so:
    var project = new File("C:\\path\\to\\my\\project.aep");
    /Ludde

  • How can I embed a video with absolute path into a PDF

    I'm having some difficulties in embedding a video into a pdf; I followed the instructions to embed it properly, but the path points to my personal computer , so that the video will be available only on the computer I used to embed the document.
    Any suggestion? Can I modify the path directly? The PDF is supposed to be linked to another interactive PDF and to work both online and offline.
    Thanks!

    Thanks for the reply. I tested the file on other computers, though, and it doesn't open the video on any computer but mine (mine: the one I used to embed the video).
    Am I doing something wrong? I'm using Acrobat X and the procedure I'm following is: Multimedia/Add Video/Choose file
    I searched for manuals online and I saw that some of them were checking the box "embed file", but I don't have that choice..
    Maybe I'm supposed to use another version of acrobat?

  • DVD Studio Pro crashes when accessing folders with mixed formats

    DVD Studio Pro 4 on Mac Book Pro OSX 10.6.8
    Program crashes whenever accessing my movies directory. It contains mostly HD content in MOV format. There are some MP4 and M4V in there too.
    To check this I copied an MOV, MP4, and M4V into a separate directory. I added this folder to the Video tab of the Palette in DVDSP and same crash occurs until I remove all but MOV content.
    Project setting is 1920 x 1080 HD. I have successfully imported several assets in MOV format.
    My question is why would DVD Studio Pro crash just because it is pointed to a directory with mixed formats? Would it not just ignore to incorrect formats and move on? Why the crash if I am not trying to import them?

    I was going to let this go doc, but....
    I discovered the crash by accident while doing Ripple Current training - yes I am a complete DVD SP newbie! Anyway my story: Oh look! There is an icon pointing at my Movies directory in the Video tab. Gee thats cool lets see what is in it. Ooooh s&*t the program just crashed! That can't be right, lets just try it again. Now thats just wrong! I'll beat this thing so lets experiment. Lo and behold its a mixed format problem. Why doesn't DVD SP just ignore any unrecognized formats like any other program? Hmm, being the newbie I am, and there was no hint in the Ripple training, I would ask the docs on the Apple forum. They will know why and what to do!
    DVD SP seemingly by default maps my Movies directory. My Movies directory has multiple formats in it from years of use. I have movies for my iPhone, iPad, movies for Vimeo and iTunes, as well as other distribution formats in the same directory. I also have been experimenting with different codecs. My Movies directory has been used as an Internet distribution point. So please excuse me if I did not clean out my Movies directory before launching DVD SP! Little did I know this would even happen. If I could "unmap" this selection permanently I would - do you know how to do this? So far I cannot find any preference for it.
    In a round-about way you got there, however so did I on my own - isolate the project to its own directory and NEVER pick on the "Movies" icon. I am not satisfied since it would be really nice to block this from ever happening again. God forbid an incorrect format should ever sneak into the sacred project directory "sorry but DVD SP and incorrect formats don't play nicely", so stop doing that!

  • Accessing Folders with random name - help =(

    Hello All,
    I am doing some parallel computing and running i.e. 100 jobs into 100 different processors. each job is producing some random folder and putting all the output files in there. now, I need to know how can i access those random folders using java. people have been recommending AbsolutePath , use of start,etc etc, but its not working.
    Thanks for your help.
    p.s. folders names are numbers in ascending order i.e. and each folder contains the same files ( file1.csv file2.csv )
    201032434/file1.csv
    201035474/file1.csv
    201042328/file1.csv
    and so on..

    the problem is i need to access these directories but
    they have random number !! so i can't really specify
    the directory and get into it...Well, they have to be stored in some specified parent directory.
    Just call File.listFiles() from that parent directory and access the "random" directories.
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

  • Receipts, absolute paths necessary?

    I used PackageMaker to set up some installation for my selfmade launch daemon. It works and the OS X installer creates receipts in /Library/Receipts for it as expected.
    To my best knowledge all of those receipts are used by disk utility to verify permissions. I found that my receipts are not used for that. I guess it's because the BOM's contents shows no absolute paths to the files.
    My example:
    lsbom -p MUGsf /Library/Receipts/dslnet_plist.pkg/Contents/Archive.bom
    -rw-r--r-- root wheel 359 ./de.realmacmark.dslnet.plist
    Example from Apple:
    lsbom -p MUGsf /Library/Receipts/MacOSXUpd10.4.7PPCPatch.pkg/Contents/Archive.bom
    -rwxrwxr-x root admin 7564 ./Library/Application Support/Macromedia/Shockwave 10/Xtras/._Flash Asset PPC
    How can I use PackageMaker to create a package that will get a receipt from the installer with absolute paths inside?

    Repair Permissions only uses certain package receipts to repair permissions. While I don't know the exact details, I believe they-- actually, I just took a look at the DiskManagementTool and figured out what packages are used. Only the following packages are used to get a list of the permission settings that Disk Utility compares against:
    /Library/Receipts/BaseSystem.pkg/Contents/Archive.bom
    /Library/Receipts/Essentials.pkg/Contents/Archive.bom
    /Library/Receipts/AdditionalEssentials.pkg/Contents/Archive.bom
    /Library/Receipts/BSD.pkg/Contents/Archive.bom
    /Library/Receipts/BSDSDK.pkg/Contents/Archive.bom
    /Library/Receipts/X11User.pkg/Contents/Archive.bom
    /Library/Receipts/X11SDK.pkg/Contents/Archive.bom
    /Library/Receipts/CommonAccessCard.pkg/Contents/Archive.bom
    /Library/Receipts/CommonCriteriaTools.pkg/Contents/Archive.bom
    /Library/Receipts/Internal.pkg/Contents/Archive.bom
    /Library/Receipts/FatLibraries.pkg/Contents/Archive.bom
    /Library/Receipts/DevDocumentation.pkg/Contents/Archive.bom
    /Library/Receipts/DevExamples.pkg/Contents/Archive.bom
    /Library/Receipts/DevSDK.pkg/Contents/Archive.bom
    /Library/Receipts/DeveloperTools.pkg/Contents/Archive.bom
    /Library/Receipts/Java.pkg/Contents/Archive.bom
    /Library/Receipts/DevInternal.pkg/Contents/Archive.bom
    /Library/Receipts/DevFatLibraries.pkg/Contents/Archive.bom
    /Library/Receipts/AddressBook.pkg/Contents/Archive.bom
    /Library/Receipts/Automator.pkg/Contents/Archive.bom
    /Library/Receipts/Mail.pkg/Contents/Archive.bom
    /Library/Receipts/MigrationAssistant.pkg/Contents/Archive.bom
    /Library/Receipts/OxfordDictionaries.pkg/Contents/Archive.bom
    /Library/Receipts/iCal.pkg/Contents/Archive.bom
    /Library/Receipts/iChat.pkg/Contents/Archive.bom
    /Library/Receipts/iTunes.pkg/Contents/Archive.bom
    /Library/Receipts/MicrosoftIE.pkg/Contents/Archive.bom
    /Library/Receipts/Safari.pkg/Contents/Archive.bom
    /Library/Receipts/AdditionalFonts.pkg/Contents/Archive.bom
    /Library/Receipts/AdditionalAsianFonts.pkg/Contents/Archive.bom
    /Library/Receipts/BrotherPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/EpsonPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/CanonPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/HewlettPackardPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/LexmarkPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/GimpPrintPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/ElectronicsForImagingPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/RicohPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/XeroxPrinterDrivers.pkg/Contents/Archive.bom
    /Library/Receipts/QuickTimeStreamingServer.pkg/Contents/Archive.bom
    /Library/Receipts/ApplicationsServer.pkg/Contents/Archive.bom
    /Library/Receipts/ServerFatLibraries.pkg/Contents/Archive.bom
    /Library/Receipts/ServerInternal.pkg/Contents/Archive.bom
    /Library/Receipts/ServerAdminTools.pkg/Contents/Archive.bom
    /Library/Receipts/ServerSetup.pkg/Contents/Archive.bom
    /Library/Receipts/ServerEssentials.pkg/Contents/Archive.bom
    /System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/Resources/ HintFile.plist
    These paths are hard-coded into the DiskManagementTool, which is what does the verification or repair of permissions. I believe the reason they're hard coded and limited to Apple-only packages is to assure that the incorrect permission settings in a poorly-created third-party package aren't used to repair the permissions to an improper value.
    Hope this helps....
    Dual 2.7GHz PowerPC G5 w/ 2.5 GB RAM; 17" MacBook Pro w/ 2 GB RAM -   Mac OS X (10.4.7)  

  • Without absolute path, SAXParser1.4   does not find schemLocation!!!!!

    Hello
    I am validating soap messages according to xsd files with the SAXParser, Java 1.4.
    My xsds include references to other xsd files as following sample shows:
    <xs:include schemaLocation="C:/temp/shiphome.xsd"/>      
    The problem is, how to say the parser where the including files are without working with absolute path to the including xsds!!!?
    The code finds the file as follow:
    factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", new File(schemaSource));
    Help!!
    Thanks

    Hi,
    well solution seems to be the following (from tomcat-users@...):
    j2ee.jar conflicts with some libraries from the tomcat-engine itsself.
    So my j2ee.jar 1.4 beta is ignored by the tomcat engine.
    I cannot place it in the general lib path, because i do not administrate the box myself.
    Solution for me is now to use the separate mail API (http://java.sun.com/products/javamail/) and javabeans (http://java.sun.com/products/javabeans/glasgow/).
    Hope that others find this helpfull, too.
    Do i get a refund for my J2EE book in my bookshelf, that i cannot use ?
    grml

  • Call Executable​, absolute path doesnt work as expected

    Hi all,
    i have a problem with the step call executable.
    I configure the step (call a .exe or bat file) with absolute path.
    As long as Teststand runs with the seq-file loaded all works fine.
    The problem shows up when i close the seq-file and reload it later.
    Then the configuration seems to be ok (still the absolute path).
    But when i execute the seq-file it runs the .exe or .bat file as it only has
    the relative path in the configuration.
    I know that, because it wanna load some files from the same folder
    and it doesn't find them after reloading the seq-file.
    Sincerely Stefan Bölsterli

    I use Teststand 3.0

  • Formula Variable with Replacement Path - drillup ref.char and still working

    Hi all,
    I have a requirement, where formula variable (with replacement path) shouldn't work when I remove the reference characteristic from the rows. But this is not the case at the moment
    I have 'Brand' and 'Material' in the rows and there is 'Material Indicator' in the columns. This 'Material Indicator' is a formula and there is formula variable in it with the type replacement path.
    Reference char is 'Material'; Replace with 'Attribute Value' is selected also. As attribute I am selecting one of the attributes of the 'Material'.
    In the report output, I am seeing relevant attribute values when Material is in the rows. But when I remove the Material from the report, I still see the values for this Material Indicator column. But I expect to see blank instead..
    Can you please share your comments?
    Thanks in advance.
    S.P.

    hi,
    Irrespective of the drilldown on Material, the fomula variable will be replaced by material value. This is how replacement variable should behave. You might have to change the design. For  more inputs, let me know your requirement exactly.

Maybe you are looking for