Returning list of files in directory not working.

Gidday
I'm using the following code to try to put a listing of files in a dir into an array.
I created a dir call myDir in the same place as my .swf and .air, and placed a file in it.  But I get error messages telling me the File or directory does not exist.
Why would this be?
var dir:File = File.desktopDirectory.resolvePath("myDir");
var files:Array = dir.getDirectoryListing();
Thanks for taking a look.

OK (still trying to get my head around the folder structure)
Say my project exe is called test.exe, and  I also have a folder called image_files and another called text_files - how do I access the image_files folder, and how do I write txt documents to the text_files folder?  In other words, I don't want to access the user's folder, or the application storage folder, just specific folders that I have set up in my Flash as3 project.
Or does security prevent accessing and writing to such folders?
So how would I alter the following code to write to the text_files folder?
function saveHandler(event:Event):void {
var file:File = File.applicationStorageDirectory.resolvePath( "myjot.txt" );
var jot:String = taEditor.text;
var stream:FileStream = new FileStream();
stream.open( file, FileMode.WRITE );
stream.writeMultiByte( jot, File.systemCharset );
stream.close();
I want the user to be able to copy image and video files to the image_files folder, and then I have access to these in the air app.  So I don't want to put them in the application Storage Directory because A) like you said, it's not designed for large amounts of data, and B) I don't want the user to have to navigate to the app data folder - I want to keep navigation simple - so program files/my app/image_files (or preferably give them the option of choosing the folder where they copy their image and video files to - so it could be on d) drive for example).
Thanks for your time and help
Shaun

Similar Messages

  • Breadcumbs don't work online: '404 - File or directory not found'

    Breadcrumbs all work fine when testing my AirHelp application offline on my Windows 7 pc, (or if I access it as online browser based help). However, when I try to test the online Airhelp most of the breadcrumbs return a '404 - File or directory not found' error.
    My RoboHelp Project has been created as follows:
    1. There is a homepage created inside of RoboHelp
    2. Then I have linked a number of framemaker books, for each of which the FM table of contents is being converted to create a new associated TOC.
    3. In the master TOC I have added a New TOC Book for each framemaker book (making it a book with a link to a htm), under the New TOC Book I have inserted a TOC placeholder for the appropriate associated TOC.
    When the Online AirHelp version is run, the breadcrumbs can only be used to navigate to the homepage and to the New TOC Books at the level immediately beneath the home page. The links to these pages seem to make sense, being of the form:
    Breadcrumb
    Link
    Home
    event:homepage.htm
    Home/User Guide
    event:../../../User_Guide.htm
    Where it goes wrong is for the breadcrumbs futher down the path which have links similar to those shown below:
    Breadcrumb
    Link
    Home/User Guide/Introduction
    event:introduction.htm
    Home/Handbook/Sign_Conventions
    event:Sign_Conventions.htm
    In both of the above the URL request that is being passed to the online server is not the full path, (it seems to be a relative path?) Is this the reason why the breadcrumbs don't work, and if so can you suggest what I need to do to get them working?
    I am up against a deadline, and at the moment the only way forward I have is to abandon the converted Framemaker TOCs and have RoboHelp autocreate a TOC for the whole project for me, however this is not a practical solution because the folder structure is not the same when I do this and would require a great deal of manual editing each time it is rebuilt.
    Hoping somebody out there can please assist?
    Thanks.

    Thanks TP,
    I have many public IP's available. Do I need to install the RD Web access role on the DMZ server that has the RD Gateway role even if i have spare public IP's available? 
    I've basically have this setup "3.1. RD Gateway without AD DS in perimeter network deployment:"
    On the below link
    http://blogs.msdn.com/b/rds/archive/2009/07/31/rd-gateway-deployment-in-a-perimeter-network-firewall-rules.aspx
    currently there's an CNAME record in DNS for remote.external.com which points to Server3.internal.pri
    which holds the RD
    Connection Broker, RD Licensing and RD Web Access roles
    Are you saying to create an A record and point it to Server3.internal.pri
    internal IP? I'm not getting certificate errors (yet) so do i have to run the script? i ask this as the error message i'm getting (404 - File or directory not found) doesn't seem to be related to certificates, i'm making changes to a production environment
    so i have to be extra carefull!
    Cheers!

  • List of Files in directory on AS

    WEBUTIL.DIRECTORY_LIST gives me the list of files on the client. But I need List of Files in directory on App Server . My App server is on LINUX and client is Windows. So How can get through oracle forms a List of Files in directory on Application Server .
    I will appreciate help ?

    I don't know if it helps you(if not excuse me)
    look at
    List of Files in directory on AS
    Running HOST Commands
    If you have a host command of the form:
    HOST ('DEL c:\temp.txt')
    This will work in both client/server and Web deployed environments, but in web
    deployed environments the command runs on the middle tier.
    in Linux ls -la > .....

  • LSO Content Player  Error - HTTP Error 404 - File or directory not found

    Hi All
    Please could you assist.
    I have published a course to my ISS CMS and configured the links in both ECC and J2EE lsm/mediator.
    Result
    Username='username', SystemName='HRD', Client='030', Host='22.22.22.22', Language='EN', SystemNumber='00', EnablePoolSharing='true', MaxConnection=50, AbapDebug=false:
    CPCFG.RSURL = http://iiscmshost.domain/LSO600/Content/
    CPCFG.REPUS = username
    ServerURL=http://iiscmshost.domain/LSO600/Content/  ok!
    I was able to successfully publish the course from the Authoring Environment to the CMS server.
    When selecting the starting the course from the portal with content player i get the following error.
    HTTP Error 404 - File or directory not found
    But the URL is referring to - http://iiscmshost.domain/lms/mediator/courseview?sid=8685627505550088697845288091101&language=EN&sys=HRD&client=030&sap-accessibility=X
    How does directory http://iiscmshost.domain/lms/mediator get created when the content is in http://iiscmshost.domain/LSO600/Content ??
    Secondly can I change this reference to my LSO600/Content directory.
    Please advise with any information. Point will be awarded.
    Regards
    Maahir

    Dear Maahir,
    We are facing the same problem. We are pointing over CMS to IIS, instead of KM content of portal. We are successfully able to release and publish the course, then attach to a course participant also.
    But. When participants logs into the portal and click on Start Now. It giving 404 file not found Error. Its the same error. All our Course and content pointed to CMS IIS Server Url.
    When we did the content player config test, result is NOT OK. We have required R3 authorization and CMS user authorization also with admin rights. Content Player console is working in AE when we start up the course. Its showing the error.
    So, it seems like content player is not working properly. Bcoz we are launching course from  http://WEBDAV repository server maintained in back end system. Which is the IIS(CMS Server)for us. Do we need to maintain anything separately to launch a course from IIS Server on R3 and SAP Portal. Below sample URL from page.
    http://Sever:port/lms/mediator/courseview = xxxxxxxxxxxxxxx
    Could you please us know, how did you resolve the issue and tell me the cause of this issue.
    Thanks and Regards
    Obli

  • RD Gateway - 404 - File or directory not found - Remote Desktop Services 2012 R2 - External users

    Hi All, 
    I’m currently deploying RDS to our network, I’ve installed and configured the RD Gateway role – accessing https://remote.external.com/RDWeb internally works fine but not externally. Externally https://remote.external.com reaches the servers default IIS page
    but once I put /RDWeb I get the error 404 – File or directory not found.
    I’m not sure what’s not configured properly but below is the setup – keep in mind that the internal domain is different to the external FQDN i.e. the server name of the GD Gateway is Server4.internal.pri and the FQDN to access RDS externally is remote.external.com 
    - Server1.internal.pri Internal Network
    RD Session Host
    - Server2.internal.pri Internal Network
    RD Session Host
    - Server3.internal.pri Internal Network
    RD Connection Broker, RD Licensing, RD Web Access
    - Server4.internal.pri DMZ Network
    RD Gateway DMZ IP/ Internal IP
    - Certificate for all servers is a wildcard *.external.com
    In the RDS Deployment Properties
    Deployment Properties> Certificates> all certificates are configured with a wildcard certificate e.g. *.external.com
    Deployment Properties> RD Web Access server= server3.internal.pri URL = https:// server3.internal.pri/RDWeb
    Deployment Properties> RD Gateway> Server name = remote.external.com – I’ve understood that this is the URL (FQDN) to access RDS and not the RD Gateway servername itself
    RD Gateway Manager Properties
    Browse and import certificate> *.external.com
    Transport Settings> IP address for HTTPS = 192.168.x.x (DMZ IP)
    Transport Settings> IP address for UDP = 192.168.x.x (DMZ IP)
    IIS
    Both the RD Gateway and the Connection Broker have https certificate as *.external.com and in the site bindings https is * for ip addresses, specifying the DMZ IP on the RD Gateway doesn’t fix the issue
    DNS, Network, Domain etc..
    remote.external.com points the Public IP in DNS with an A record – Public IP is NATed to the RD Gateways DMZ IP on the firewall – RD Gateway is joined to the domain – RD Gateway has another NIC with an internal IP
    Firewall
    Port 80, 443, 3391 is open from the internet to the RD Gateways DMZ IP, RD Gateway also has an internal IP with full access to the other RDS roles
    Errors I receive with the MS Best Practice Analyzer
    Problem:
    The Remote Desktop Gateway (RD Gateway) server Secure Sockets Layer (SSL) certificate may not have a valid certificate subject name.
    Impact:
    If the RD Gateway server is configured to use an SSL certificate with a certificate subject name that is not valid, users cannot connect to internal network resources (computers) through the RD Gateway server.
    Resolution:
    Use the RD Gateway Manager tool to select a valid SSL certificate for the RD Gateway server to use.
    Even though I did configure this… seems like it might be from the split DNS
    Other 
    I can access RDS from the RD Gateway box https://remote.external.com and client machines
    no certificate errors internally, either externally when I reach the default IIS page of the RD Gateway i.e. https://remote.external.com
    Any help is much appreciated!

    Thanks TP,
    I have many public IP's available. Do I need to install the RD Web access role on the DMZ server that has the RD Gateway role even if i have spare public IP's available? 
    I've basically have this setup "3.1. RD Gateway without AD DS in perimeter network deployment:"
    On the below link
    http://blogs.msdn.com/b/rds/archive/2009/07/31/rd-gateway-deployment-in-a-perimeter-network-firewall-rules.aspx
    currently there's an CNAME record in DNS for remote.external.com which points to Server3.internal.pri
    which holds the RD
    Connection Broker, RD Licensing and RD Web Access roles
    Are you saying to create an A record and point it to Server3.internal.pri
    internal IP? I'm not getting certificate errors (yet) so do i have to run the script? i ask this as the error message i'm getting (404 - File or directory not found) doesn't seem to be related to certificates, i'm making changes to a production environment
    so i have to be extra carefull!
    Cheers!

  • 404 Error - File or Directory not found

    Hi there
    I have a simple CF page set to do a dump of the server only at this stage.
    <cfdump var="#server#">
    It works fine when I'm on the server itself and run from 127.0.0.1/mydomain/index.cfm
    When I try to run from www.mydomain.com - I get a 404 file or directory not found
    Is this a CF error or is this an error being thrown up from IIS
    How do I get around this error ?
    Thanks in advance.
    Kind regards

    Hi Nexusxox,
    In addition, To troubleshoot the winodws updates issue, please follow these methods:
    1.  You should be able to access the Windows Update website. If you can't access this site, try to use the
    Windows Update Troubleshooter to fix the problem.
    Refer to:
    http://support.microsoft.com/kb/2497281#manually
    2.  Recreate SoftwareDistribution folder:
     1) Stop the Automatic Updates and Background Intelligent Transfer Service services.
     2) Delete or rename the %windir%\SoftwareDistribution folder.
     3) Restart Automatic Updates and Background Intelligent Transfer Service services.
    3.  Reset Windows update:
    How do I reset Windows Update components?
    To do so: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added
    protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge
    Base: 322756 (http://support.microsoft.com/kb/322756/)
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Troubleshooting Lync 2010 404 - File or Directory Not Found

    Reading through several posts in this forum about 404 errors, none of the ideas have helped me with this problem
    I have a single Lync 2010 server used for IM, Video and Audio conferencing; no voice. Lync 2010 clients work just fine, getting the Web App to work with an emailed meeting link like https ://meet.mydomain.com/username/C32249V3 displays a web page with 404
    - File or Directory Not Found. Silverlight is installed, no errors in Event Viewer for Lync, iisreset has no affect.
    Open for other ideas to try and places to look at?
    AIS

    Hi, you can check before with a Ps command like
    $cred1 = Get-Credential "litwareinc\kenmyer"
    $cred2 = Get-Credential "litwareinc\pilar"
    Test-CsWebApp -TargetFqdn atl-cs-001.litwareinc.com -UserSipAddress "sip:[email protected]" -UserCredential $cred1 -User2SipAddress "sip:[email protected]" -User2Credential $cred2
    $cred1 = Get-Credential "litwareinc\kenmyer"
    $cred2 = Get-Credential "litwareinc\pilar"
    Test-CsWebApp -TargetFqdn atl-cs-001.litwareinc.com -UserSipAddress "sip:[email protected]" -UserCredential $cred1 -User2SipAddress "sip:[email protected]" -User2Credential $cred2
    TechNet Link
    regards Holger Technical Specialist UC

  • 404 - File or directory not found - HFM WORKSPACE

    Hello All,
    We are seeing the error below when a user logs onto an HFM app.
    *"404 - File or directory not found.*
    *The resource you are looking for might have been removed, had its name changed, or temporarily unavailable."*
    When they click on Administration -> and any menu items, the error goes away and they are able to go to that navigation page.
    Could anyone suggest how to prevent this from happening?
    Thanks in advance,
    Regards,
    SM

    Ok.
    Things to check:
    #1 - If it is a default startup item from workspace, you can go to the preferences menu item and change that. (File --> Preferences --> General --> Default Startup Options)
    #2 - If the default item is in the reports explorer, check preferences as well. (File --> Preferences --> Explore --> Default Folder
    #3 - If none of that works, you can try clearing out the user preferences for the user by looking at the HFM database. Go to the following table : <app name>_USERPARAMS and pull all records that match the username (DB field = username) in question.  You can remove those rows from the table and it will reset that user's preferences.  I THINK HsvSystemInfo_LastContentSrc points to the last item they were using and deleting that might be sufficient, but I haven't had to do this in a while so I cannot say for sure.....

  • 404 - File Or Directory Not Found Upon Intersection Check Report Display

    In FDM 11.1.2.1, when there are intersection check errors, instead of the intersection check report automatically opening in a new tab, I get a "File Download" message box with Open and Save buttons. If I choose Open, I get the "404 - File or directory not found" error. If I choose Save and save the file to a local path, I never get the option to open the file and the "Processing. Please wait..." message runs forever.
    FDM is running on virtual Windows Server 2008 R2 64-bit, IIS 7, Excel 2007, with SQL Server 2008 R2 64-bit and IE 7 web client.

    Tony, thanks, I'd like to give your work around a shot. We've tried all of Oracle's recommendations with no luck. I have temporarily unhidden my e-mail address in my user profile. Please let me know if you need anything else.

  • 404 -File or directory not found error

    We have had several users report the following error message that appears inside the Rich Text Editor that is used for Instructions on the Process Steps of Formulation specs, in 6.1.0.1.32.
    +404 -File or directory not found. The resource you are looking for mighthave been removed, had its name changed, or is temporarily unavailable.+
    Here's the scenario. They are in edit mode on the Formulation Spec.
    They go to the Process tab.
    Click A Step, and see that there are several blank lines at the end of the instructions, and they want to clean up this blank space.
    So they click the Instructions link, and the Instructions pop-up in a rich text editor.
    They click in the editor near the bottom to get a prompt on the last blank line.
    They then hit the backspace key to delete the blank lines.
    As soon as they hit the backspace key the error is thrown in the editor; Not in an error message popup and no error log is recorded in the event logs.
    And to make it even more interesting it doesnt happen all the time!
    Has anyone else seen this behavior within Formulation specs?
    P.S. Its not the IE pop-up blocker either.

    Trey, i just did a quick test and was able to duplicate with the following steps:
    1. open instructions
    2. instead of clicking in the edit textbox, click below the edit textbox (ie. b/w the textbox and keywords)
    3. hit backspace
    404
    my guess is, users are working quickly, think they click in the textbox, but accidently click outside the textbox. backspace is then trying to register a previous page command.
    However, we changed the rich text control in 6.1.1, and it looks like this issue has been corrected.
    if you find a different set of steps to recreate that triggers the 404, let us know.
    thanks,
    -M

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • Sumtotal error 404 - file or directory not found

    Hi,
    We have a SCORM 1.2 compliant content created using Captivate 5. It's a multiple SCO (6 modules) combined into a single SCORM package. When the package was loaded in Sumtotal LMS, one of the modules alone does not launch and throws the below error.
    404 - File or directory not found.
    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    However all the modules get loaded when tested in Saba LMS. Any ideas on what could the issue in Sumtotal? Would greatly appreciate a resolution at the earliest.
    Thanks,
    Sudarsan

    r_sudarsan,
    I 've seen that error 404 numerous times in the past. It always seems to be related to the configuration of the web server not able to match the Domain name with the IP address, wrong path name, check the spelling, browser startup default settings to locate the website. etc. It always seems to be a configuration problem.
    Good Luck.

  • Hyperlink to file in JSP not working

    I have a JSP page where I am providing a hyperlink to a file on the C: drive as follows
    Try this
    Nothing happens when I click this hyperlink.
    When I scroll over the hyperlink I see the correct path "file:///C:/ReqImport/data.txt" in the status bar and when paste this path in my address bar, it does open up the file.
    Any ideas why this file hyperlink does not work on this JSP page.
    Thanks

    Hmm, you're right, I just tried it and it doesn't appear to work. It looks like a security thing: If the original page is on my hard drive, links to other files on my hard drive work. But when the original page is on a web server, links to files on my hard drive don't appear to work.
    Do you realize that such a link is referring to a file on the C: drive of the client, the user, not the C: drive of the server? I'm not sure what you're up to, but for most applications such a link is pretty much useless, as you normally have no way of knowing what files the user has on his C: drive.

  • Include file in jsp not working

    Hi ,
    I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
    My include code looks like this :
    <%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
    <!--#include virtual="includes/footer.html" -->
    My jsp file is hosted on IIS

    nb123 wrote:My jsp file is hosted on IIS
    Hi ,
    I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
    My include code looks like this :
    <%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
    <!--#include virtual="includes/footer.html" -->
    My jsp file is hosted on IIS
    Check the path you've specified. It may well be;
    <%@include file="hello.jsp" %>or
    <%@include file="/Includes/hello.jsp" %>

  • File conversion is not working

    File conversion is not working.

    Using online services and it simply times out. I login and upload the file
    I want converted and it takes 5 mins or longer and then simply says the
    file conversion failed.
    I got one file to work, but it took like 12 tries.
    Very annoying and it's impossible to call and get a tech person to help.
    On Tuesday, February 11, 2014, PECourtejoie <[email protected]

Maybe you are looking for