Note: Replacing all occurrences of \\ by just \ would be wrong for full qualified file name having a UNC path which must start with two backslashes. I just wanted to let you know that Im very happy to have bought EditPad Pro. UltraEdit is a powerful disk-based text editor, programmers editor, and hex editor that is used to edit HTML, PHP, javascript, Perl, C/C , Python, and virtually any other coding/programming language. So it is also possible to use in UltraEdit script: var sFullFileName = sPath.replace(/^\s /,"").replace(/\\\\/g,"\\") The File Navigator is docked to the right. The UltraEdit function UltraEdit.saveAs() expects a String object as parameter. UltraEdit is a powerful disk-based text editor, programmers editor, and hex editor that is used to edit HTML, PHP, javascript, Perl, C/C , Python. I cant personally recommend Python for it, but Im currently part of a. UltraEdit for Mac is a native Mac application based on the popularultraedit Windows text editor, UltraEdit UE Mac offers a myriad of tools that make it ideal for anything from basic text editing, to a full-fledged development in languages such as C, Objective C, Javascript, XML. A better name for this string variable would be sFullFileName. Also, UltraEdit JavaScript has a great deal more flexibility than UltraEdit scripting. UltraEdit is the world's best text editor, now available for Mac. The invalid full qualified file name string is already stored in a JavaScript String object with the not really good name sPath. The first replace removes all leading whitespaces according to Unicode definition and the second replace modifies all occurrences of \\ to just \ in file name string before the fixed full qualified file name is copied back to clipboard.īut there is really no need to use a clipboard as also written by Alexander Pavlov. It is of course also possible to use in UltraEdit script following line before saving the new file with full qualified name in clipboard. And leading spaces/tabs/newline characters should be also removed from file path string in Excel macro before copying the full qualified file name to clipboard. Therefore the file path must be defined in Visual Basic macro with just \ and not with \\. ![]() In Visual Basic strings the backslash character is not an escape character like in other programming and scripting languages. Unlimited open files, unlimited editing file size length, powerful syntax highlighting for C/C , Delphi/Pascal, 80x86 assembler, Java, Java Script, Visual. These issues should be best fixed in Visual Basic macro in Excel file. But the full qualified file name should be nevertheless 100% correct. \\ within a file path is no problem for Windows file system kernel functions in comparison to the newline character which is an invalid character for a file name or path according to Microsoft's documentation Naming Files, Paths, and Namespaces. The full qualified file name in clipboard is invalid because of having leading newline characters.Īnd the full qualified file name string contains additionally \\ instead of just \ as directory separator. I agree with Alexander Pavlov and his analysis of the cause of the issue. Which is the directory of the original file. It saves the file to directory H:\IPEX\DataFiles\Boomi_IPEX_Files Instead of saving the file to directory H:\\IPEX\\DataFiles\\IPEX_Originals_Cleaned_Files\\ The write command shows me the following: sPath Value After assign= This is the code I am trying to fix: lectClipboard(1) // switch to user clipboard #1 But I don't want to hard code the path: var sPath="H:\\IPEX\\DataFiles\\IPEX_Originals_Cleaned_Files\\" If I use the following code it saves the file properly. Up until this point all work and if I do a write of the value I read in the temporary file I see that I have the correct path.īut when I use the saveAs("^c") the file does not get saved to the path I specified, but instead gets saved to the current directory. In the Excel macro I write the path that I want the new file to be saved in by the UltraEdit script. ![]() ![]() Note: UltraEdit is a text file editor so if you don't use it, what follows might not be of much use to you.I am using an Excel macro to call up UltraEdit in order to execute a script on some files. St: An UltraEdit script for echoing a command within a loop ![]() Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at.
0 Comments
Leave a Reply. |