Retrieve the path of file name

Hello

I have a string containing a complete file name; that is, the path and the name of the file.

How can I get just the path out of this string?

I tried 'File (FileName.path)' but it is something like "0000 temp".

Apparently this works only on a file object, not a string.

I wanted to do something by find/replace in the string... but I don't know about it.

In other languages, I would do a reverse lookup on a slash - that would be the last slash in the string

and I would erase everything after that.

If anyone can help me with this, I will appreciate it greatly!

Thank you

Davey

Suppose a string variable s; then

myPath is Folder (s) .path;.

(if string s is a legal path) will give you the path associated with ss the full path.

Peter

Tags: InDesign

Similar Questions

  • The HTML - output folder Option and the path of file name change question

    In the HTML Options to file and output file name I was wondering if I can change the name of the .chm automatically listed when I click on properties?

    For example, when I click on properties for ABC_v456, which is a SSL in the project ABC123, I see "C:\Projects\ABC_v123\!" SSL!\Help_v456\ABC123.chm' in the output folder and file name field.  I would rename ABC123.chm in ABC456.chm for the love of light. When I compile it will then create a file .chm by ABC456.chm name rather than the name of the ABC123.chm file? I would have then two SSL in the HTML project called Help_v123 and Help_v456each and their respective .chm would be within each folder.  I speak of the sense or is this clarification requiring gibberish on my part? I use Robohelp HTML v7.

    Hi karima

    You should be able to freely appoint the CHM everything that makes sense for you in the field.

    I remember that too, you are perhaps involved in the development of CSH. If the name of the file could play an important role in that. But even after you generate the help, you should be able to rename it if you wish.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7 or 8 times now - $24.95!

    Adobe Certified RoboHelp HTML Training

    SorcererStone blog

    RoboHelp EBooks

  • How can I get the 8.3 file name short AND way?

    We use some old DOS programs and need to use the old format back (filename.xxx). When the files are in the long trees, it is very difficult to find the names of files under Windows.

    There was a response published in Google (http://answers.google.com/answers/threadview/id/522710.html) which works very well under XP, but when I use it in Windows 7, I get the long file name.

    Does anyone know how to do this?  The program can be changed?  Here is the program of this flajason-ga posted, but it must be updated for Windows 7 (I only know how to program in Foxpro).  Thank you, Alan

    Topic: Re: how to get the 8.3 file name short AND path?
    From: flajason-ga on May 27, 2005 10:45 PDT
     

    After my last comment, I read your details a little closer.
    The last script I posted was to list out a whole directory in 8.3 format.
    If you are looking for a friendly way of Clipboard to recover the 8.3
    for individual files, that will be more to your liking.

    Same thing as before. Copy the below into Notepad and save it with a .vbs extension.
    Except that this time, you can simply drag and drop a folder or file icon
    on the .vbs file and it displays the short path in an input box.
    where you can copy the value and use anything you want to.

    If you're industrious, you can also save the .vbs file in your
    Folder "send to" (C:\Documents and Settings\ [yourname] \SendTo) to have
    It is available in your context menu with a right click.

    Set fso = CreateObject ("Scripting.FileSystemObject")

    ' Is a file or a folder?
    If fso. FolderExists (WScript.Arguments (0)) then
    "It's a folder
    Set objFolder = fso. GetFolder (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFolder.ShortPath)
    End If

    If fso. FileExists (WScript.Arguments (0)) then
    "It's a file
    Set objFile = fso. GetFile (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFile.ShortPath)
    End If

    Hello

    Read the following article.

    How Windows generates 8.3 names to long file names
    http://support.Microsoft.com/kb/142982

  • Service to retrieve the path of folder by folder GUID

    Hello

    We use the framework of issues and we would like to display the path of the folder for each result on the default search results page. However the standard search service returns the guid of the folder for the documents in the search results. That's why I need to translate the guid for the actual path. I could create my own personalized service for this but I may already exist and if so it will probably works very well at the time.

    so my question is: is there an ootb in WCC service that I can use to retrieve the path of folder by folder guid

    Kind regards

    Maarten

    I haven't installed the component in my system, but could you please check the FLD_INFO service?

    http://docs.Oracle.com/CD/E23943_01/doc.1111/e11011/c08_frameworkfolders.htm#CHDCFGEB

  • Problems with the "use tiny file names...". "checkbox in the settings of WebHelp box

    Given that the RH 9 is only able to run on Windows, the checkbox "Use tiny file names..." ' (see image below) can cause some unexpected problems when generating output for a unix (or linux) platform. I found this recently when generating output of web for a project that is visualized on a linux platform machine and met hundreds of broken links unexpected help.

    WebHelp Settings - User LowerCase for Unix.jpg

    If this is the first time you generate your project output, this function works very well - it converts all topics, image files and all what it takes to display help, lower case. However, if for some reason, you had generated previous outputs without this box, and now you have decided that you want all your files output in lower case, just check this box and regenerating the output will not work.

    The reason is simple - the Windows operating system does not distinguish between upper and lower case in file names (e.g., fichier.htm name is the same as the FILE name.) (HTM). UNIX (and linux) are case-sensitive and treat these files are two separate files. Therefore, HR fact not (cannot) change existing file in your folder names with this checked out and gives no message indicating such when generating the output. In this case, the only way to solve this problem is to delete the folder containing your output files and have HR to regenerate your project from scratch.

    I had an additional problem which has made things even worse. In a project for a linux platform, I have unchecked the box during the creation of project by accident (perhaps over a period of days or weeks). Then, due to another problem, I had to restore my project at an earlier stage. At this point, I discovered that my necessary help links of the files using lowercase and uppercase the filenames for all work very well.

    I've seen no mention of this in the HR documentation, so I thought that I must draw the attention of the HR community.

    Yes - just to clarify, I'm taking everything I publish on.

    Reminder - just those who publish in a Unix/Linux warning environment if you need to change the case of file names in your folder you post on and you already have stuff in there with the same name, you will need to delete the files first before you republish.

  • Path and file name of the message is too long to be copied-how fix?

    On Windows 7, TB ver 24.6.0, I use a program called SecondCopy to copy my email when my C drive on my desktop to our file server.

    I get several messages each day like this one for the copy be saved on our network data sharing:

    04/07/2014 21:07:16 - failed to create \\Oz\Data\System\Users\billr\AppData\Roaming\Thunderbird\Profiles\5kxps6et.default\ImapMail\imap.googlemail - 4. com\INBOX.mozmsgs\urn.correios.msg.201211050157328fade3baa08b405e9a940681276b34d9%401352080653478.rte-svc-onebox-na-1d-i-8da6c8f1.us- east - 1.amazon.com.wdseml cannot create the file «» The file name or extension is too long

    I did some shorten folder names, but my names pale in comparison with the LOOOOONG TB gives them names.

    How can I fix?

    I did some shorten folder names, but my names pale in comparison with the LOOOOONG TB gives them names.

    This is because the wdseml files are just files created in order to allow windows to search to index your mail. I will not allow it and safe lots of disk space completely wasted on a feature that I don't use. Thunderbird has a search engine perfect condition. At least as good as windows search.
    Your mail is stored in highest MBOX files in the profile as well as a file of the same name with an extension of MSF that indexes the contents of the folder. One file and one index per mail folder. In the above example, it will be \\Oz\Data\System\Users\billr\AppData\Roaming\Thunderbird\Profiles\5kxps6et.default\ImapMail\imap.googlemail - 4. com

    So I suggest backing up your profile under these space takers and seriously consider just disable windows search. Menu (Alt + T) tools > options > advanced > General in respect of the integration of systems.

    In addition we have all to live in the 256-character limit on the length of the path imposed by windows.

  • Get the path of directory name

    Hello

    I need to read the path of the directory 'directory name '. I know that I can read this dba_directories but it requires the grant of the sys user...

    Are there other options to get the path of the directory of the directory name.

    I need the directory path in the java stored procedure which concatenates PDF files on disk to the db and then store in BLOB table field...

    Not really, either dba_directories or all_directories, where information is queryable of.

  • CFHeader to set the content-disposition file name does not

    Hello


    We have the code that creates a workbook with the POI library and then using CFHeader to set name of file with content-disposition, as shown in the code below. After making the content available, we write the Excel workbook in the browser. The code is below.


    This works perfectly in CF 9 but when we went to SEE 11 we found it doesn't work anymore. The same code works fine in CF 9 but not in CF 11. The file name is ignored and the file is now given the name of the cfm script is called with the correct xls extension.


    Any suggestions as to what is the cause for CF not CF 9 11 would be appreciated.


    Code:

    < name cfheader = "Content-Disposition" value = "seizure; filename = "#arguments. "FileName #" ">"

    < cfscript >

    Write the workbook in the ByteArrayOutputStream to get the ContentLength

    local.workBook.write (local.outStream);

    local. Len = arrayLen (local.outStream.toByteArray ());

    local.outStream.flush ();

    local.outStream.close ();

    Working now on the display of the browser output stream

    local. Context = getPageContext();

    local.context.setFlushOutput (false);

    Calling the getResponse twice (2nd getResponse) method gets the binary response of the character response (1st getResponse)

    local. Response = local.context.getResponse (m:System.NET.FtpWebRequest.GetResponse ());

    retrieve the output stream from the response to the browser.

    local.out = local.response.getOutputStream ();

    local. Response.Reset ();

    Set the content type and the contentLength

    If the two are not provided, then the data will be displayed not correctly

    local.response.setContentType("application/vnd.ms-excel");

    local.response.setContentLength (local.len);

    write the workbook in the binary output of http response stream

    local.workBook.write (local.out);

    clean things up and close the output stream

    local.out.Flush ();

    local.response.flushBuffer ();

    local.out.Close ();

    < / cfscript >

    Kind regards

    Leslie

    I found the problem. He is not related to the use of the POI library to all. Also we are migrating to CF 11 currently and just try to get things migrated as is. After our migration, we will look at CFSpreadsheet to see if it can meet the demand of our users formatting now.

    It seems that the call to local.response.reset () in CF 11 now clears the response properties, including the elements of headers. CF 9, he should not have deleted them as background. By setting the Content-Disposition response header after this point, the value was available for the browser to use.

    If the default file for a generated file name must be the name of the script creating the name of the file followed by the file appropriate for the file extension.

    The updated code is below, note the lines of code in bold.

    Write the workbook in the ByteArrayOutputStream to get the ContentLength

    local.workBook.write (local.outStream);

    local. Len = arrayLen (local.outStream.toByteArray ());

    local.outStream.flush ();

    local.outStream.close ();

    Working now on the display of the browser output stream

    local. Context = getPageContext();

    local.context.setFlushOutput (false);

    Calling the getResponse twice (2nd getResponse) method gets the binary response of the character response (1st getResponse)

    local. Response = local.context.getResponse (m:System.NET.FtpWebRequest.GetResponse ());

    retrieve the output stream from the response to the browser.

    local.out = local.response.getOutputStream ();

      local. Response.Reset ();

    Send the browser the good content-disposition header

    local.resp = local.context.getResponse ();

    local.resp.setHeader (("string", "Content-Disposition") javacast, javacast ("string", "001438.EPS nt;filename=#arguments.fileName#")); "))

    Set the content type and the contentLength

    If the two are not provided, then the data will be displayed not correctly

    local.response.setContentType("application/vnd.ms-excel");

    local.response.setContentLength (local.len);

    write the workbook in the binary output of http response stream

    local.workBook.write (local.out);

    clean things up and close the output stream

    local.out.Flush ();

    local.response.flushBuffer ();

    local.out.Close ();

  • How to retrieve the path of the data store

    I am writing a perl script using the API SOAP Labmanager to deploy several configs in Labmanger. After the deployment of the Config/VM, I want to interact with the virtual machines in each config file. To do this, I use the Perl API of VIX. My problem is that I need to know the path of the data of each virtual machine store as soon as it is deployed so that the VIX commands can be run on it.

    The script is multi-threaded. Each thread represents a configuration with a virtual machine.

    I know how to list all the warehouses of data for all registered virtual machines. The name of the virtual machine is not unique, so I can't analyze this list for this. Does anyone know how reliable to get the path of the data for a VM store knowing ConfigID/MachineID or MachineId combo? Ideal, I would be able to sometype of search the ID that will allow to obtain the path of the data store.

    I'm open to VI Toolkit, VIX, or anything else out there that will allow me to get this info (preferably using Perl).

    Thank you.

    I think that's maybe what you are looking for:

    Method LabManagerInternal.GetConsoleAccessInfo

    (public) MKSConsoleInfo GetConsoleAccessInfo

    machineId int

    );

    Parameters

    machineId

    It returns a type of object called MKSConsoleInfo that contains a VmxLocation value. When I tried through soapUI he gave me a valid path to the file in vmx to the machine_id that I went there

  • How cffileupload and store the paths of files in a database?

    I use CF 9 and work download multi-fichiers. I need help is a help desk page that displays the names of files with links to the files that are uploaded with the form that a user submits. When I view a page admin, I need to see the form results to email with a list of downloaded files and links to where they are.

    Any ideas on how I can get an admin page to show only the files associated with each form submission? I guess I have to find a method for stroring each path of file uploaded to a database, but I don't know how to do this. Any help would be appreciated. Thank you

    You can do the following:

    (1) create a database table named uploadedFile. Columns can be, for example,

    upload_id: INT, autoincrement, primary key

    DateTimeCreated: DATETIME

    ServerFile: varchar (50)

    serverdirectory: varchar (30)

    (2) make your multi-upload, for example,

    myMultiUploader.cfm

    myUploadFiles.cfm

    Insert in uploadedfile (datetimecreated, serverdirectory serverfile)

    ("values (#cffile.timecreated #,"#replace(cffile.serverdirectory,"\","/","all") # "," #cffile.serverfile # ")

  • Is it possible to sort the images by file name?

    I imported a record of 200 images in Photos for OS X (El Captain). Image files have been appointed in the order - I want them to appear in a slide show: photo_01, photo_02 etc...

    Once I imported the images - I found them all out of order - and the only options I can find in the view menu are somehow 'oldest first', 'newest first' or ' title '. Please, someone tell me I'm missing something obvious - he and not that Apple chose to omit the possibility to sort the images by name? If this is the case - I'm speechless - how is f - ing stupid!

    Sort by file name is not an option in the Photos. Albums and smart albums you yourself set can be sorted by name, date of capture, or manually.

    Sorting through the predefined albums is automatic:

    • 'Photos' display with moments and collections is sorted by date of capture and the location.
    • 'All the Photos' display is sorted by the date of the import session.
    • Other built-in smart albums are sorted by the date of capture.

    You can see the current sort order, preset, if it is grayed out in the "view > sort ' menu.

    As a workaround:

    1. If you need to want pictures to be sorted by file name, copy the name of the file in the title field. Then, create a smart album of the items and sort by title. We have posted a trick to copy the name of the file in the title field for the selected photos: Script: change the title filename without Extensionor: Script: batch change the titles of the Extension/w
    2. Or view your photo library in pictures of power.  This versatile tool lets you browse photos as a list or thumbnail while looking the other metadata under the thumbnails or displayed as list with columns selected and sorted by columns.

    You can do a lot with the free trial: download PowerPhotos here: Fat Cat Software-PowerPhotos

  • AppleScript to the batch change file names

    I got the following script to a Mac user previous on this forum that works very well for a folder of files, but it does not work for a folder of files. How can I modify this script to work on files instead of files. What the script does is strip leading or the characters of files contained in a specified folder.

    Set Folder choose a folder

    Set theResult to display dialog "delete characters in the name:" buttons {"Cancel", "End", "Beginning"} default 0 Cancel button "Cancel".

    BTN set to the button returned of theResult

    Set text returned by theResult nCharacters as integer

    If btn = 'End', then the value of nCharacters - nCharacters

    Tell application "Finder".

    Repeat with thisFile (document get in Folder files)

    theFullName thisFile name value

    Set {oldTID, delimiters of point for the AppleScript text} to {AppleScript point text delimiters "."}

    If (number of items in theFullName text) > 1 then

    the properName my ((texte Articles 1 thru-2 dele de theFullName) text pad value, nCharacters)

    the revisedName value to (properName (get last element of theFullName text) {}) as text

    on the other

    the value revisedName my trim (theFullName, nCharacters)

    end if

    the text value of the AppleScript point oldTID delimiters

    revisedName thisFile name value

    end repeat

    tell the end

    on the trim (t, n)

    If n > 0 then

    Returns the text (n + 1)-1 through t

    on the other

    Returns the text 1 to (n - 1) t

    end if

    end trim

    Replace the line immediately after the tell one with:

    Repeat with thisFile in (get files Folder)

    (137177)

  • Specify the path to file report with Expression

    TS201x help under "Specifying report file paths by Expression" talking with a number of macros various, but starts at the page that shows how to use FileGlobals also. When you specify the expression (... > specify the path file of report by Expression > Expression browser), I would like to combine macros with FileGlobals, but none of the FileGlobals are listed is available. The expression builder has access to the StationGlobals however, but not in the FileGlobals.

    Is there a workaround solution, or at least an explanation of this behavior?

    See you soon

    I think you found a bug in the documentation.  In the process of old models, you can use the FileGlobals of the process model as that sentence States.  Now that they moved to Plugins I don't think that this is no longer true.  You may need to go with a StationGlobal on it.

    Or you can cancel the ReportOptions recall and change the Parameters.ReportOptions.ReportFileSequentialModelExpression variable to include the information in your customer file.  So, basically, to define a placeholder in your expression in the dialog box options report.  Then in the callback to use the SearAndReplace method to replace the placeholder with the specific data.  It worked for me when I tested it.  The nice thing about this way, is that you don't have to manage the StationGlobals.

    Hope this helps,

  • How can I change the font color on the title of file name list in a folder?

    When you do a "file save as"..., type a document name... Can have the police on this document at a red name round (or other color) fonts for the list of files in the folder.  I want to be able to open the folder and have a file name "stand out" in other securities of black font in grip my eyes with red font?

    Vista does not have this capability.  There may be some 3rd party programs that might work for you, but I could find no one who were free and no coming to add this feature to Windows Explorer.

    Here "a s business option: http://www.xyplorer.com/index.htm but it's a pretty radical change (it is just to add the ability to change the fonts, colors file, and includes many other options, but it is not Windows
    Explorer - this is a totally different file manager) and it costs money so I do not recommend because I think that it is better to use a totally different program Windows Explorer, even if it means not to change the font color of file names.  And if you check, it's a bit expensive just to get this functionality (and who knows the other features of Windows Explorer that you like that you may lose with this alternative - don't really know us much and that it works well with Vidta or causes problems - maybe even serious problems as far as we know - because I know anyone who has ever tried it).

    Sorry if this isn't what you wanted to hear, but it's like that. I think the right answer is that Vista is not supported this feature, and then remove it.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • file restoration and file under the icons of file names

    I searched, found and lost the answer to this question. How to restore the names of folders and files under the icon in windows Explorer. They are all displayed on save. However, when I open a file or a folder that they are not shown and I have to go through many twists and turns to find the file I'm looking for.

    Open a windows Explorer... at the top menu bar click view, uncheck "Hide file names".

Maybe you are looking for

  • Can I update my card wireless Intel Pro 3945abg on my Pavilion dv 6426us?

    I have an Intel Pro 3945abg network wireless adapter in my Pavilion dv6426us, model of product # GA378UA #ABA.  I want to run on networks of HQ (5.0 GHz) or n (2,4 GHz).  Is this possible and what would be the model of the adapter which should be? Th

  • False values of voltage using NI 9225 and ELectrical Power Suite 2014

    Hi all I have a few problems regarding the use of a map of analog voltage NI 9225 with code exaple quality Applications of power (cRIO) (Delta-Sigma) of the Electrical Power after 2014. Running the example code I values of voltage wrong, they are exa

  • P7-1534: motherboard update

    Hello! I want to improve my motherboard because I bought a CPU but the p7-1534 motherboard socket is not compatible, so I want to update the motherboard. But, the problem is that if I update the motherboard I want to continue to use the Windows opera

  • No removable drives

    OK when I boot up I have 4 hard drives, removable, display, I uninstalled the drivers and every reboot they are back.I have the ability in PC for four additional disks, but I've never used slot machines.They all show up as USB keys which is a little

  • How can I turn off the data execution prevention in Vista.

    I am trying to download the Ikea home planner and it won't let me.  I get a DEP error message and it stops my internet explore.