Fscommand exec foldername with space

Hi,
I'm trying to use fscommand exec with a relative path and the
folder name has a space in it.it 's not working.ANy idea how it'll
work.
fscommand("exec", ".\\folder space\\xyz.exe"); //do not work
fscommand("exec", ".\\folderspace\\xyz.exe"); //works if I
create a folder without space .

no response of Adobe
just say to be impossible ?

Similar Messages

  • Runtime.exec command with spaces

    I'm having problems using exec on (unix) commands that take filenames as a parameter - eg chmod.
    The problem is that I've been blessed with some filenames which contain spaces and I can't figure out a way to pass these through.
    The code I'm trying is :
    String fs="/";
    String droot="home";
    String fname="tom test";
    String fullFileName=fs + droot + fs + fname;
    String outlist[] = runCommand("chmod 777 " + fullFileName );
    if fname contains no spaces, then this will work fine, but (as in the example above) if it contains a space, then I get an error (can't find files).
    Any ideas?
    Thanks
    Tom

    The reason that putting quotes around the filename works on the command line is that they affect how the command line interprets them.
    However, Runtime.exec does not intepret the quotes as special characters. If you have a space in an argument, you should use the Runtime.exec method that takes a String[] argument, and place each argument in an array element.

  • Problem with fscommand exec

    Hi everyone ;)
    im creating a Flash Projector to use in a interactive cd.
    I need to open .doc files
    i try this:
    on (release) {
    fscommand ("exec", "test.doc");
    i put the test.doc in a subfolder named fscommand on the root
    of the
    projector.
    i try to put the .doc in the same folder of the projector
    nothing happens
    anyone knows what im doing wrong?
    I use Flash 8
    Ps.: Sorry my bad english... i'm from brazil
    Tks

    ToKa wrote:
    > Hi everyone ;)
    >
    > im creating a Flash Projector to use in a interactive
    cd.
    > I need to open .doc files
    > i try this:
    >
    > on (release) {
    > fscommand ("exec", "test.doc");
    > }
    >
    > i put the test.doc in a subfolder named fscommand on the
    root of the
    > projector.
    > i try to put the .doc in the same folder of the
    projector
    Unfortunately you can't do that. EXE is for executable type
    of files only.
    Such as EXE, COM or BAT, not doc, gif, rtf, jpg etc...
    You could use BAT file to open it but that's not very neat
    solution.
    Another way would be with 3rd party tools.
    Try Jstart. I have been using Jstart for many years now, very
    reliable tool,
    here is the url.
    http://flashjester.com/?section=tricks_jtools_jstart
    JStart will allow you to not only launch a program, but use
    parameters to make
    the program open files, perform special actions and just
    about anything you can
    use parameters for. You can also choose to launch files with
    their default
    associated program.
    Another solution is provided by Rick Turoczy, it's pretty old
    but it should
    still work. Perhaps give it a try.
    http://www.flashgeek.com/tutorials/07_launchapp_01.asp
    Easy to use tool that allow you to launch basically anything
    from the projector.
    As long as there is system default application supporting
    particle file.
    Best Regards
    Urami
    Beauty is in the eye of the beer holder...
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Pass parameter with fscommand exec

    Hi,
    I am writing a text file with batch file and this batch file which is called from fscommand.
    I need to pass a parameter from fscommand. Is is possible ?
    Following is flash and batch file code.
    Flash Source
    import flash.events.Event;
    bt.addEventListener(MouseEvent.CLICK,save);
    function save(e:Event){
        fscommand("EXEC","write.bat");
    Batch file
    ECHO This is my new text1 %1 > "temp.txt"
    Thanks ------------------- Amit

    As mentioned in one of your other posts you could use FileReference.save(...) this does require user interactive however and Flash Player 10.
    Alternatively you could create a userId and save the data in an online database (but obviously this isn't local)
    If you are using AIR you could create a local database
    Otherwise I don't do not know of a way to achieve what you are after

  • Runtime.exec() - using cp and files with spaces on unix

    I'm using the Runtime.exec method to copy files in a unix environment. This works fine until there is a file where the name has spaces in it. I've read the article on the pitfalls of using runtime and how it breaks a string on white spaces and this is what is happening. I've also found another topic that was having the same problem, but they were using /usr/bin/dos2unix. I've tried putting quotes around the filename, but it still breaks on the first space. Any suggestions on how to get around this or another way of doing this would be greatly appreciated.
    An example of the os command string is:
    /usr/bin/cp /tmp/file with space.doc /docs
    Thanks!

    Hi!
    Well I dont have any Sun machine right here to try this but in windows It works great.
    Have you tried something like this ?
    import java.io.*;
    public class OSCopy {
        public static void main(String[] args) {
            try {
                String space = " ";
                String copycmd = "E:\\cp.cmd";
                String source = "E:\\File with space.txt";
                String destination = "E:\\tmp";
                String cmd = copycmd + space + "\"" + source + "\"" + space + destination;
                System.out.println("cmd: " + cmd);
                Runtime runtime = Runtime.getRuntime();
                Process copy = runtime.exec( cmd );
                BufferedReader reader = new BufferedReader( new InputStreamReader( copy.getInputStream()) );
                String line = null;
                while( (line = reader.readLine()) != null ) {
                    System.out.println( line );
            catch (Exception e) {
                e.printStackTrace();
    cp.cmd is a simple dos copy command
    copy %1 %2
    */good luck!

  • Runtime.exec with spaces not working EVEN using String[]!!

    Hi everyone,
    I need to start the rmi registry from some code,and i need to pass it the classpath of two jars when initialising it. My problem is that the paths I set aren't taken when they contain a space.
    Here's the code:
    <code>
    String rmiRegistryCommandLine[] = new String[] {
    + System.getProperty("java.home")
    + "\\bin\\rmiregistry.exe\"",
    "-J-Djava.class.path=\""+System.getProperty("user.dir")+"\\MyJar.jar\"",
    "1099"};
                                            Runtime.getRuntime().exec(rmiRegistryCommandLine);
    </code>
    I know that Runtime.exec(String) tokenizes the input, which is why I'm not using it, but Runtime.exec(String[]) isn't supposed to tokenize the input. System.getProperty("user.dir") can contain a space, so I put quotes around that, but I need the -J-Djava.class.path in the same string. I tried breaking it up into two more separate strings but it didn't even run for normal non-space paths then. I am sure that if the whole -J-Dblah....upto MyJar.jar was in quotes then it would work, but I need the classpath in quotes separately as it could contain a space.
    Can anyone help me get this working?

    Ya, that's fine but the command line I want to pass is:
    d:\j2sdk1.4.0\bin\rmiregistry.exe -J-Djava.class.path=d:\my dir with spaces\MyJar.jar;d:\my more dir with spaces\MyJar2.jar 1099
    If I say
    arg[0]="d:\\j2sdk1.4.0\\bin\rmiregistry.exe";, that's finebut arg[1] is the problem
    if I say
    arg[1]="-J-Djava.class.path=d:\\my dir with spaces\MyJar.jar; d:\\my more dir with spaces\\MyJar2.jar";, then it definitely won't work on 9X machines and probably not on NT.
    if I break up arg[1] into:
    arg[1]="-J-Djava.class.path=";
    arg[2]="d:\\my dir with spaces\\MyJar.jar";
    arg[3]=";";
    arg[4]="d:\\my more dir with spaces\\MyJar2.jar";I'll need to put quotes around the two individual two class paths or else it won't work.
    I find though that if I put the classpath as follows
    d:\"my dir with spaces"\MyJar.jar then it seems to work.
    I think a regular expression function to search for any directory with spacees and then put quotes around it and reinsert it into the path would be the solution.

  • Problems with spaces in file or directory names and Word.exe

    Hi
    I'm trying to open a file with Word from my java aplication, and I have a problem with some file/directory names.
    I have this
    String cmd = "c:\\Program Files\\Microsoft Office\\Office10\\WINWORD.EXE" + " " + path;
    try {
    Runtime.getRuntime().exec(cmd);
    } catch (Exception errorea){ }
    Here is what happens:
    if path is something like this: "c:\people\info.doc" , there's no problem, Word opens the document, but if path contains blank spaces somewhere, it doesn't work. For example:
    path = "c:\Documents and Settings\info.doc"
    path = "c:\Hi everybody\info.doc"
    path = "c:\tests\test results.doc"
    with the above examples it doesn't work :( Word tries to open "c:\Documents", "c:\Hi" or "c:\tests\test".
    Can anyone help? thanx a lot ! : )

    Hint: use the variant Runtime.exec(String[] args).
    Create a command array, with each token in a separate argument. The entire filename with spaces goes into one argument.

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • Link to Network Drive with Spaces

    I need to create a link in SharePoint 2010 that points to a network drive with spaces in the title. SharePoint substitutes %20 for spaces, but I need the space character.
    For example:
    file:///\\company\foldername   works
    file:///\\company\folder name   does not work, it becomes
    file:///\\company\folder%20name 
    Has anyone run into this issue before?

    Hi Andy,
    20% represents space in url encoding and it is hardcoded. I don’t think it is better to remain space character in the link.
    http://en.wikipedia.org/wiki/URL-Encoding
    Here is a thread discuss about that:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5cc9881d-e72c-434f-be07-bd6d2a74eec6/sharepoint-file-issue-20-replaces-space-in-file-name?forum=sharepointadminlegacy
    http://www.networkworld.com/article/2221731/microsoft-subnet/simple-naming-conventions-that-improve-end-user-experience-in-sharepoint-sites.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Fscommand "exec" doesn't work in Mac (Flash Player 10.1)

    Hi All,
    I am trying to launch an external application using fscommand in Mac ('fscommand' works fine on Windows). I have done following things to make it work:
    Written an apple script to launch a pdf and saved it as "test.app"
    I copied "test.app" to "fscommand" directory. (fscommand is a directory under 'flash projector.app')
    Tried to launch the "test.app" using fscommand, as shown below:
                fscommand("exec", "test.app");   
    But, my efforts went in vain. It did not work. I even tried to copy "fscommand" dir to "Flash Debugger Player.app/Contents/MacOS/", but still I can't make it work.
    More Info:
    Mac version: Mac OS X 10.6.2
    Hardware: Intel Core duo 2
    Flash Player Version: 10.1 (standalone projector)
    Is it something I am missing or is it a bug in Flash Player 10.1? Does anybody could make it work; Please let me know!

    Praveen,
    Im in the same boat. - Im trying to open a mac projector .app from inside another .app by using Fscommand "exec".
    After reading this
    http://www.morgadinho.org/2007/03/12/launching-an-app-with-fscommand-on-mac-os-x/
    have created applescripts with .app extension inside Fscommand folder, but to no avail.
    Have heard anything/ had any resolution yet?
    james

  • Fscommand exec on mac to open pdf works in a cs3 projector file but not in a cs5 projector file

    Hi,
    I could succesfully open a external pdf with the following command in Flash cs3 on a Mac:
    fscommand("exec", "test.app");
    test.app (inside an fscommand folder) is an apple script that opens the pdf inside the fscommand folder, to make it work I needed to copy the fscommand folder into the MacOs Folder of the Mac Projector File. The same steps don't seem to work with Flash cs5. I can't downgrade my cs5 project to cs3.
    Is this problem a bug in Flash cs5?
    Has anyone solved this problem?
    Thank you.

    I had this same issue today - could not get a mac projector, FP 10, built in cs5, to run fscommand("exec", "test.app") no matter what I tried. I also couldn't find any definitive threads via google, so here's everything I know about fscommand("exec") for anyone who's looking.
    I wanted to run a custom batch (.bat) file on windows and a custom applescript file on mac. I needed to restart a legacy, cross-platform kiosk application on a click (unfortunately could not use AIR).
    On the Mac (Flash CS5) - First off - Flash CS5 on Mac did not work no matter what I tried
    I also tried opening up the .app package contents and copying the fscommand folder into that, with no luck.
    You have to create the projector in CS4 (I down-saved to CS4 and used my PC running CS4 to publish) and put the "callee" .app in a folder named fscommand alongside the projector.
    I used these directions to create an .app of my applescript that restarts my projector: http://soapbox.lafayette.edu/node/517
    Here's the applescript I wrote:
    tell application "kiosk"
        -- kill the "caller" app if running
        quit
    end tell
    set myFile to (path to me)
    tell application "Finder"
       -- the delay wasn't needed in practice, but might be of help
       -- delay 1
        open application file "kiosk.app" of container of container of myFile
    end tell
    Now when I call
    fscommand("exec", "restart.app");
    on a mac, my kiosk restarts as expected.
    For PC peeps, I used this awesomely simple solution on windows (Flash CS4)
    http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy
    I put two files in my fscommand folder (at the same directory level as my projector):
    - restart.exe (proxy.exe from above link renamed)
    - restart.bat
    The .bat file simply has 1 line that starts my projector (in the parent folder):
    ..\kiosk.exe
    I call
    fscommand("exec", "restart.exe");
    and then have a 1 second timeout to kill the first "caller" projector. I wrapped the function as it didn't seem to work otherwise:
    setTimeout(function(){fscommand("quit");}, 1000);
    Yes, this means that I have two instances of the kiosk running at the same time for about 1 second.
    Apologies if my response was slightly off-topic, but I hope the info helps someone avoid losing a whole evening on a pressing deadline like me!

  • Fscommand("exec".... substitute???

    I feel like ahab chasing moby dick.
    I am trying to create a flash projector program that sends
    variables to an external program (which is priadoblender-compiled
    php)
    i thought fscommand("exec", userReg.exe + var1 + var2 + var3
    + var4) would work because of MX2004 let it happen, but I am now
    working in flash 8 professional.
    I know this doesn't work. I have read up and down.... forums,
    blogs, white papers etc.
    I am looking for a simple alternative to this problem. I
    thought AFsaver might be the solution, but for the love of god, I
    can't figure out the syntax and the documentation on afsaver is
    slim to none.
    is there some program that will allow me to just pass
    variables to an external program that will work in flash 8?
    the premise is basic.
    1) have flash projector call a program , perhaps with
    fscommand
    2) pass variables to it, (any amount between 1-50 vars) the
    speudocode example I have above would be ideal...
    I don't know how simple this is to manufacture. but I believe
    it would be simple enough to read the program name and parse out
    the variables from a single string.
    if AFsaver has a way to do this, that would be great too. I
    would just need to know the syntax to make it work properly.

    try third part tools like SWiSHstudio or Flash Jester or SWF
    Studio. Also
    look at free ones like the open source screenweaver. If all
    you need is to
    pass parameters to an exe, then you may not need the more
    expensive third
    party tools.
    Jeckyl

  • FullScreenTakeOver, fullscreen, and fscommand exec

    I am not a programmer. I switched to CS3 for flv ease of
    skins, but I'm finding AS3 to be extremely difficult to learn.
    I have an .fla that I am publishing as a Mac projector and a
    Windows projector. It took me 2 days just to learn the new way to
    handle simple buttons and now the Mac projector is already acting
    up on other simple commands. I haven't even had a chance to test
    the Windows .exe because I can't get the Mac version to work. I'm
    hoping the problems are the same so I only have to deal with this
    once.
    I'm at the point where I'm trying to get this to work:
    //in first frame
    fscommand("fullscreen", "true");
    myvideo.fullScreenTakeOver = false;
    //in different scene
    myButton.addEventListener(MouseEvent.CLICK, openSyllabus);
    function openSyllabus(event:MouseEvent) {
    fscommand("exec", "syllabus.app");
    seems simple enough right?
    Here are the problems:
    1. fullscreen is not actually fullscreen. It has a menu bar
    the top of the window.
    2. "myvideo" is an FLVPlayback component. It is contained in
    an swf called "video.swf". video.swf is loaded into an mc in my
    projectors main timeline called "videoSpot_mc" like this:
    teleButton.addEventListener(MouseEvent.CLICK, newvid);
    function newvid(event:MouseEvent) {
    var loadit = new Loader();
    addChild(loadit);
    loadit.load(new URLRequest("video.swf"));
    videoSpot_mc.addEventListener(MouseEvent.MOUSE_DOWN, newvid);
    But when video.swf loads into videoSpot_mc it goes to a black
    screen despite having "myvideo.fullScreenTakeOver = false;" in
    frame one of the main timeline. I tried it in frame 1 of
    "video.swf" timeline, too and it just made the movie freeze. What's
    wrong here?
    3. fscommand is not opening "syllabus.app" which is a simple
    application that in turn opens "syllabus.pdf".
    I am working on a Mac OS 10.4.10 publishing from Flash CS3
    v.9.0.3 in AS3.
    What am I doing wrong??? I really need these answers fast or
    I will probably lose this client. Thanks in advance.

    Thanks, but it needs to be a hybrid cd. If only the windows
    version works then its useless.
    I got the fullScreenTakeOver = false; to work. I also found
    out that if you put
    fscommand("fullscreen", "true") in the first frame and then
    fscommand("fullscreen", "false") in the second frame and then
    fscommand("fullscreen", "true") in the third frame, then the menu
    bar will go away like it used to by just putting it in the first
    frame.
    The fscommand("exec", "myapp.app") never worked. I searched
    every forum on the web and found only more people with the same
    problem. I ended up switching back to AS2 Flash Player 8 and
    created fullscreen video and other effects myself through AS2.
    fscommands all worked swell. No issues.
    I find Flash 9 and AS3 to be bad product "advancements" and
    am happy I used the trial version before paying out the money for a
    product with so many flaws and setbacks.

  • Fscommand exec problem

    Hello everybody,
    I know similar questions have been many times asked on this forum, and I've read them and tried the diffrent solutions proposed, without attaining my goal.
    My goal is to launch a software some_software.exe with an executable projector created  with Flash in ActionScript 3.
    The software some_software.exe must absolutely be in a sub-subfolder compared to the position of the projector launcher.
    I've tried many things I read on this forum and others, like :
    fscommand("exec","Products/some_software/some_software.exe")
    or
    fscommand("exec","./Products/some_software/some_software.exe")
    or
    fscommand("exec",".//Products/some_software/some_software.exe")
    I know very well that it is said in Flash MX CS3's help file that the executable to launch some_software.exe must be in a fscommand folder.
    I have tried :
    fscommand("exec","Products/some_software/fscommand/some_software.exe")
    with no more success.
    I have also tried to launch some_software.exe in a sub-sub-folder from a batch file .bat.
    During my direct tests while launching the batch file, this one containing :
    @ echo off
    start Products/some_software/some_software/some_software.exe
    exit
    The batch file worked fine, even with paths in the subfolders very deep.
    But when I launch the .bat file indirectly, with the Flash projector, in which I wrote :
    fscommand("exec","batch_file.bat")
    the batch file seems to open very briefly the black MS-DOS subscreen, this subscreen disappearing immediately, and some_software.exe was never launched !
    Did anyone have the same problem ? Were you able to make it work ?
    If it's the case, many thanks by advance if you can show me a solution to my problems, or, even better, if you can propose the sources of your solution compressed in a .zip file !
    Many thanks for your help,
    Roland

    http://forums.adobe.com/thread/60643?tstart=0

  • Fscommand exec

    Hi,
    Why fscommand exec don't run on Flash CS3 ???
    What's the way now to launch an application with the
    projection ?
    thanks
    JP

    no response of Adobe
    just say to be impossible ?

Maybe you are looking for

  • Impact of Installing BI Java on an ABAP only BI 7.0 system

    Afternoon Everyone, I'm looking to answer a couple of questions around installation of BI Java on an ABAP only BI 7.0 system. Firstly, I am looking for some guidelines around common problems we would expect to see if a BI java stack is implemented on

  • Moving iPhoto library -- how do i point iPhoto to library on external hard drive

    I am trying to move my iPhoto library to an external hard drive.  I've already copied it from my MacBook to the external HD.  I tried launching iPhoto while holding down the option key so that I can point iPhoto to the new location, but no new window

  • Unable to add files to itunes

    i had my mac air retored to factory settings and now my itunes is wiped out. and i am trying to add files to it the way i used to by drag and drop.  When i drag the file into itunes, the plus sign appears like it normally does. But once I drop, nothi

  • Configurable preliminary planning

    Hello to everybody, I manage configurable finished products. They have two kinds of characterictics types. Commercial caracheteristichs and functional ones. By dependencies (procedure) and variant tables I can infer values for functional characterist

  • Regarding I$ table in ODI...

    Hi All, I am new to ODI and testing interfaces whether data is flowing from source to target. I have more than 10 interfaces and those interfaces may use the same database tables. Now I would like to run all interfaces in one go using a script. I und