Creating file in a folder

There doesn't seem to be any way to right-click and create a text/ open office file in a folder. At the moment, I am launching the application (e.g. Text edit), saving my document in the desktop and then drag and drop the document to the specific folder.
Is there any easier way?
Thanks.

Open the AppleScript Editor in the /Applications/Utilities/ folder and paste in the following:
tell application "Finder"
make file in (get folder of window 1)
end tell
Save it as an application and put it in the Dock or the Finder's toolbar. This will only work with TextEdit as written, but if you have a blank document in any format presaved elsewhere, it can be copied there.
(109971)

Similar Messages

  • How to create file in specific folder...

    Hi developers,
    I am new to java. I would like to create file in some folder. But i am fail to create it. Can any body help me please..
    This is my code. It creates folder well...But file doesn't create.
    import java.io.*;
    public class file1
         public static void main(String ar[])
              File f = new File("c:\\ram");
              f.mkdirs();
              String pat = f.getAbsolutePath();
              File ffs = new File("c:\\ram.txt");
              System.out.println(pat);
    }With Regards
    sure...:)-

    Also, it's not clear where you want the file.
    You're making a directory C :\ram, but then you're talking about a file ram.txt that's right in C:
    Also, you can use / instead of doubling up the \ and it wil get converted properly.
    If I wanted to create a file C:\ram\ram.txt I'd do this:
    File parentDir = new File("C:/ram");
    File file = new File(parentDir, "ram.txt");
    parentDir.mkdirs();
    file.createNewFile();

  • How to Create File in another folder

    hi,
    I need to create a RandomAccessFile in Folder and that Folder was also created here if self only, so How it do this in a program.
    tname="xyz";
    String fname=tname+".xml";
    file = new File(fname);
    File dir=new File(tname);
    String path=dir.getAbsolutePath();
    System.out.println(path);
    if(dir.exists()==false)
    dir.mkdirs();
    I try to create xyz.xml file in xyz(folder name) itself, how can if be
    Thanking you,
    RaviVarma.K

    I'm not sure what you are trying to do but you seem to need
            File f = new File("the path of the file you want to create");
            f.getParentFile().mkdirs();No need to make the mkdirs() conditional since it will only make the directories if they don't exist.

  • Creating file in shared folder

    I need to access a folder on a network ( say \\server1\test ). test folder is shared on \\server1 with permission only to user 'A'. Now a java program ( Simple code snippet given below ) running will not be able to access the given folder due to access restriction. How can I make this code access the given folder and create a file xyz.txt in it.
    Code snippet :
    import java.io.File;
    import java.io.IOException;
    public class test
    public static void main(String[] args)
    File file = new File(\\\\server1\\test\\xyz.txt );
    try
    file.createNewFile();
    catch (IOException e)
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    make sure that you have read and write permissions on that shared resource. i mean full access on that shared folder. with out full access you can't create/delete anything there. with read only access, you can read the content of the folder as well as that file only.
    Diablo

  • Full permission but unable to create file on network share

    Hi all,
    We have a file server running Server 2003 R2 which has multiple shares configured.
    On one of the shares, there is one user who cannot create files on a share, even though they have full control permissions to the share and all subfolders
    So far I have:
    Added username specifically to permissions
    Confirmed at each folder level that the permissions are replicating
    Removed and re-added permissions
    Confirmed that user cannot create files on any folder within the share
    Checked effective permissions which return they should have full control
    Checked event logs and found no errors
    Copied the user account in AD and logged into to the same server and was able to create files on share
    They are connecting via RDS running on Server 2008 R2 enterprise and accessing the share via mapped drive
    Any suggestions?

    Hi,
    Do you mean that if you directly logon the Server 2008 R2 not using RDS, then you can create files on share? Please refer to the thread below to check if it helps:
    Can't copy and paste files using RDP session in server 2012
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/9c4eae05-b477-4c2d-8743-56508e870128/cant-copy-and-paste-files-using-rdp-session-in-server-2012?forum=winserver8gen
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Create XML file in network folder

    Hello All,
    I am reading data from SQL tables and getting  in the form of XML. I need to create a xml file with the same data and store the file in network folder.The name of the file should be with timestamp.xml.
    Please suggest.
    Regards.
    Anshul

    Hi Michael,
    Thanks.
    I am using XML SAVER action to create and save the file . It's working fine if in configure object file path is as  "\\drive\folder\TEST.XML". In this case it's generating the file with name TEST.XML.
    I  configure link of same XML SAVER action and specified same "\\drive\folder\TEST.XML" for Path property. In this case it's giving me the error.
    "Invalid link expression in action[XML_Saver_0]:\\drive\folder\TEST.XML"
    I tried first with test file (Fixed name ) but it's not working. Once it will work i can use expression editor for date and time function.
    I also need the expression to add date and time in place of TEST.
    Regards.
    Anshul

  • Cant get list of files from a folder (even though the folder and files are created with the same app)

    Ok so each character rolled with my app gets saved as an html file in a folder i create on the sdcard called RpgApp
    the code to do this is 
    private async Task saveToHtmlCharacter(string name)
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    StorageFolder sdcard = (await externalDevices.GetFoldersAsync()).FirstOrDefault(); //Windows.Storage.ApplicationData.Current.LocalFolder;
    var dataFolder = await sdcard.CreateFolderAsync("RpgApp",
    CreationCollisionOption.OpenIfExists);
    var file = await dataFolder.CreateFileAsync(name+".html",
    CreationCollisionOption.ReplaceExisting);
    using (StreamWriter writer = new StreamWriter(await file.OpenStreamForWriteAsync()))
    writer.WriteLine("<html><head><title>Character File for " + z.charNameFirst + " " + z.charNameSecond + "</title></head><body>");
    //trimed for the post
    now this as i say works perfectly and i can confirm that the files show up in the "RpgApp"folder
    now the next step is to have the app read the names of each of those html files and create a seperate button for each one named for the filename and with the filename as content (later i will link them up to load the html file they are named for in a webbrowser
    panal)
    here is the code that *should* do that
    private async Task readFiles()
    z.test.Clear();
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    StorageFolder folder = (await externalDevices.GetFolderAsync("RpgApp"));
    IReadOnlyList<StorageFile> fileList = await folder.GetFilesAsync();
    //z.test.Add("dummy");
    foreach (StorageFile file in fileList)
    z.test.Add(file.Name);
    public async void buttonTest()
    await readFiles();
    CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
    foreach (string name in z.test)
    Button button1 = new Button();
    button1.Height = 75;
    button1.Content = name;
    button1.Name = name;
    testStackPanal.Children.Add(button1);
    now i say should as what i get is an error of "A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll" (2 of them in fact one after another)
    more detailed error is at http://pastebin.com/3hBaZLQ9
    now i went through checking line after line to find the error and line that causes it is:
    StorageFolder folder = (await externalDevices.GetFolderAsync("RpgApp"));
    in the readFiles method
    i checked to make sure the case is right etc and its spot on, that IS the folder name, and remember my app creates that folder and creates the files that are inside that folder (and only files my app creates are in that folder) so it should have access
    im 100% stuck its taken me all day to get the files to save and now i cant get them to list correctly
    I have tested the button creation function with fake list data and that worked fine, as i say the error is when i tell it to look at the folder it created
    all help most greatfully recieved

    this was actually solved for me on another forum thread 
    async Task<bool> continueToReadAllFiles(StorageFolder folder)
    if (folder == null)
    return false;
    if (folder.Name.Equals("RpgApp", StringComparison.CurrentCultureIgnoreCase))
    var files = await folder.GetFilesAsync();
    foreach (var file in files)
    test.Add(file.Name);
    return false;
    var folders = await folder.GetFoldersAsync();
    foreach (var child in folders)
    if (!await continueToReadAllFiles(child))
    return false;
    return true;
    public async void buttonTest()
    test.Clear();
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    var folders = await externalDevices.GetFoldersAsync();
    foreach (var folder in folders)
    if (!await continueToReadAllFiles(folder))
    break;
    //.... commented out
    ...now i say solved this is more a workaround...but it works.
    I would love to know why we cant just scan the RpgApp folder instead of having to scan the whole dc card and disregard all thats not in the RpgApp folder

  • I created a new home folder on an external but didn't move my old files over. Now I can't see the old hard drive in my mac mini. How can I locate that drive?

    I wanted to move my home folder to an external drive. I created a new home folder and in advanced options I moved it over. I didn't however move my files over first, my bad. Now I can't see the hard drive on my mac mini. Is it possible to reverse it or get access to the old home folder and is it possible to still use the mac mini's internal hard drive for storage? How do I find my shared folder, it was on the internal drive. I'm new to macs as you might have guessed at this debockle. Can anyone help?

    I'm using Mavricks. I wanted to move my home directory to an external and went into sys prop/users/advanced options and moved the folder ok. Being a noobie on Macs I didn't copy my data and such. So my settings were all new. Basicly now I don't see the internal drive on my mini. There is a lot of strage I'm not able to access. The internal drive doesn't show up. How can I put a folder back onto it so it shows up?

  • Creating File objects from all files in a folder.

    Hi, I'm not too brilliant of a programmer, so this may be an obvious one that I could find in the API.
    My goal is to compare files for similarities and then give some output, that's not too important.
    My question is: How do I create an array of File objects from a folder of *.txt files, without creating each individually? Is there a way to simply get all the files from the folder?
    File I/O is still pretty new to me. If I didn't give a good enough explanation, please say so.
    Thank you very much!

    Note by the way that a File represents an abstract pathname, the idea of a file as a location. It doesn't specify the file's contents, nor does it require that the file it represents actually exists. A better name might be "theoretical file" or "directory listing entry".
    So getting a whole bunch of File objects is itself perhaps not necessary (although it could be useful).
    To expand on reply #1, look for File methods whose names start with "list".

  • Creating Rpt Conmgr Cache File In Temp folder while opening report from app

    hi frends,
    I m facing one problem with my Web based erp application which is developed in .net ,
    in my application when i open the  report from my applicaiton , in my temp folder there one file gets created name is "rpt conmgr cache"
    bcoz of this for few records also my report takes too much time and opens very slow and it takes long time, and it happens in some of the reports only , other reports are working cool and its not creating any file in temp folder,,,
    so can u guide me whats this file and what can be the solution for it,
    Thanks
    Mithun

    I have never heard of "rpt conmgr cache" being created in any temp directory. Is that the actual name of the file you are seeing?
    As you have not applied any updates, I'd recommend applying SP 4 to your development system. SP 4 is here:
    https://smpdl.sap-ag.de/~sapidp/012002523100006255422008E/crxir2_sp4_inc.exe
    Next, I'd recommend getting the SP 4 runtime on the client. You have two options; MSI file of create your own deployment sing the msm files. The MSI file is here:
    https://smpdl.sap-ag.de/~sapidp/012002523100009657852008E/crxir2sp4_net_si.zip
    MSM is here:
    http://resources.businessobjects.com/support/communityCS/FilesAndUpdates/crxir2sp4_net_merge_modules.zip
    Also, I don't think I still have a good handle on this:
    "my report takes too much time and opens very slow and it takes long time"
    What is long time? Two seconds, two minutes, etc.?
    Ludek

  • How to create files into a NT authentication folder

    Hi all,
    I know how to create txt files on a local computer. But is it possible to create files into a NT shared folder on server machine which is user/password protected?
    thanks,

    Hi,
    try it with SAPFTP.
    look:
    - sample RSFTP004
    - <a href="/people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap">FTP</a>
    Andreas

  • I have been trying to download photos. It keeps saying can't create file, please check permissions on destination folder. Ihave made sure I have set the permissions on read and write. What am I doing wrong?

    I have been trying to download photos too my MAC. It keeps saying can't create file, please check permissions on destination folder. Ihave made sure I have set the permissions on read and write. What am I doing wrong?

    Lanakivee
    Try this it worked for me Pat Willener gave it to me off the site :
    I have not read all you wrote, so I may have missed some points. As I understand it, you installed FP 10 on IE7, but it won't play any Flash content?
    Try this
    download the FP uninstaller from http://www.adobe.com/go/tn_14157
    close all browser windows, then run the uninstaller
    download the offline ActivX installer for Internet Explorer from http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe
    close all browser windows, then run the installer

  • Adobe PDF (Print) presets: "Cannot create the file. The folder may be write protected."

    In Windows 8, this feature of InDesign CS6 only works for the local Administrator account:
    File -> Export -> Save as type: Adobe PDF (Print) -> Save -> Save Preset... -> OK
    If you try it with any other account this error message is given: "Cannot create the file. The folder may be write protected."
    For anyone else encountering this problem, a workaround is to run as administrator.

    Which permissions exactly did you set, how did you set them and what did you set them to?
    The path to the Drop Box would be /Users/someuser/Public/Drop Box but you obviously wouldn't want the ownership and permissions to be the same on all four directories.
    Have you tried using Disk Utility (/Applications/Utilities/Disk Utility) to repair permissions? That would probably be the best way to ensure they're correct.
    - cfr

  • Counting files in a folder and showing results in an alert window.

    Hello all.
    I would like to get the script to count the number of files in a selected folder.
    I have a UI where there are browse, ok and cancel buttons.
    I wanted the OK button to show the number of jpeg files in the selected folder. If no folder is selected, and the OK button is pressed, it would prompt the user to select a folder before pressing the OK button.
    Thanks!

    all you need to learn scripting is in the "JavaScript Tools Guide", you're making some progress but reading that and following the samples will make things clear and speed the learning proccess up.
    if you look at your code there's only one function, it is called when the Browse button is clicked. See how it is constructed and write another similar function for the Ok button, in there read the contents of the label box and create a folder with that path, then call the function to read the files.
    dlg.Panel1.okBtn.onClick = function (){
       selectedFolder = new Folder(decodeURI(dlg.Panel1.Path.text));
       if (selectedFolder.exists)
            doSomething (selectedFolder);
       else
            alert("select a folder first...");
    dlg.center(); //center dialog box on screen
    dlg.show(); //show dialog box
    function doSomething(folder)
            files = folder.getFiles();
            alert(files.length + " Files in selected Folder");
            alert(files);

  • To Place the XML file from one folder to another folder in AL11

    Hi All,
      Here my requirement is to create the quotes using XML document. The XML document will come from the Application server. this one is fine.
    Now my prob is after processing the XML file, we have to place the XML file into another folder.
    Please let me know how to move the data inot XML file.
    Now iam reading the data into one variable V_string(it will contains the total XML file). From this variable how to move the data into APplication server.
    Please do the needful.
    Regards,
    Sreehari

    Hi,
    Use FM WS_FILE_COPY To FIrst Copy the File to some Location
    and Next Use FM TMP_GUI_DELETE_FILE To Delete the File from Old LOcation.
    Regards
    Bala.M

Maybe you are looking for

  • COPY CONTROL: SALES ORDER WITH REFERENCE TO QUOTATION

    Hi. We are creating a sales orders with reference to a quotation. When copying, we'd like to be able to include another new position type in the sales orders. For example: QUOTATION: POSITION 10: TYPE ZTAB SALES ORDERS: POSITION 10: TYPE ZTAB POSITIO

  • Mavericks 10.9.1

    I installed this update today, and WOW !  What a difference on my 2009 MBP !!!!!!  It feels like a new computer !!!!!!  FAST !!!!!!  GREAT JOB APPLE !!!!!!!!!!  THANK YOU !!!!!!!!!!!!!!

  • Problems with iTunes syncing iPhotos on Time Capsule after Mavericks update?

    Hello all, I currently have all my Music/Movies/TV Shows/Photos stored on my Time Capsule and have been using iTunes and iPhoto to retreive files from it with no problems until I recently upgraded to Mavericks. Couple of days ago, I updated to Maveri

  • Can't close firefox tabs even in safemode. (Windows 7)

    I normally run firefox with NoScript and AdBlock. Lately I have been unable to close tabs and after research saw that it was recommended to try safe mode. Safe mode has been working fine for me, but just now I cleared my cache and now I can't close t

  • Another SWF opening problem.

    Hi I am stuck and need help!! In dreamweaver cs5, i'm trying to add swf file, inserting media/swf. Going to properties and pointing the src and file to the correct files in the files panel. Press play in the preview panel and all is good. Put to doma