How to keep the spaces outside the files when you drag and drop them in a .bat file.

I have a bat file, where I run a powershell script passing one argument which is a folder name. I added the file beats in my office, so I could just drag and drop a folder in the Explorer on the bat file.

Works very well. With the exception of a killer detail. When I drag and drop a folder that has spaces, the process does not receive the full path. Space is causing the script to fail. Thus, for example, I can't drag & drop c:\program files\ in the bat file.

Is there some setting in which case I can force drag & drop to use filename not spaced? Why don't the OS automatically in the argument with the quotes around it?

In a command environment that it is practical common to surround with quotes of files names. If the names contain no spaces, then double quotes can be omitted. That is why your batch file should read

PowerShell.exe myscript.ps1 "%."

Tags: Windows

Similar Questions

  • How can I highlight objects in adobe flash when you drag and send it back.

    Its a mobile game. Adobe flash cs6

    Leo Angelo Laude wrote:

    but I have a lot of objects to straggle. It is possible to have a function?

    Yes, this is why I have posted, »

    You should use something like:

    var draggedObject:MovieClip;

    var draggableObjectsA:Array = [...];

    for (var i: int = 0; i<>

    draggableObjectsA [i] .addEventListener (MouseEvent.MOUSE_DOWN, startdragF);

    draggableObjectsA [i] .origIndex = draggableObjectsA [i].parent.getChildIndex (draggableObjectsA [i]);

    }

    function startdragF(e:MouseEvent):void {}

    draggedObject = e.currentTarget;

    draggedObject.startDrag ();

    draggedObject.parent.addChild (draggedObject);

    stage.addEventListener (MouseEvent.MOUSE_UP, stopdragF);

    }
    function stopdragF(e:MouseEvent):void {}

    draggedObject.stopDrag ();

    draggedObject.parent.addChildAt (draggedObject.origIndex);

    stage.removeEventListener (MouseEvent.MOUSE_UP, stopdragF);

    }

  • I've lost the ability to copy files on my CD player. When I drag and drop, the only authorized action is 'move' and it does not work.

    I've lost the ability to copy files on my CD player.  When I drag and drop, the only authorized action is 'move' and it does not work.   I tried press and hold the CTRL key while dragging, and when I do that all the other disks show "copy" as the default action, but when I hover over the action CD player available only changes to 'pass '.   I ran the Microsoft Troubleshooting tool for CD/DVD players and he said that the media were not writable, but there is a blank CD in the drive.  Any ideas on how to solve this problem?

    Thanks, but the cd/dvd drive works well - I can burn a cd with windows media player for example.  the problem is that I can't copy files to it.   I can play CDs (haven't checked the DVD).  I can not do and could do before, is doing drag and drop files on it.  The only authorized action is "move".   This happens even when I click CTRL + do drag.   I can copy it to any other player, but the CD player, and when I hover over the "exemplary" drive CD goes to 'move '.

    have you tried using a different suite of cd/dvd burning?

    Imageburn is free and easy to use: http://download.imgburn.com/SetupImgBurn_2.5.7.0.exe

    There may be something to play with your access keys if you have a (ie., wirekeys)

  • I just picked up a 12 inch I have pad PRO and bought a keyboard provided by Apple, however I find that the base remains unstable and keeps the hustle when you type, the seller it says it's a design flaw. Can someone tell me if this is the case?

    I just picked up a 12 inch I have pad PRO and bought a keyboard provided by Apple, however I find that the base remains unstable and keeps the hustle when you type, the seller it says it's a design flaw. Can someone tell me if this is the case?

    find it hard to imagine that Apple could sell these defective products.

    If the seller is an authorized Apple reseller, an independent company,

    You may need to ask you if you could see & try a different product sample

    because you might be looking at something that has a defect.

    {According to the related help page, Type position should be more

    stable to use. However if the keyboard is not flat, this sounds like default.}

    Sounds as if you're not at the official Apple Store (apple retailer)

    but, on the contrary, are somewhere else. Could you give more information?

    Some keyboard accessories are made by third party companies; so

    If the product has an Apple product model number, we note here.

    When considering the purchase of an accessory, it's a good idea to test

    and check in the store before you buy. An official Apple Store has

    a different return policy as an independent reseller of Apple.

    Don't know if I can be useful; These chat rooms are usually Apple

    users of products such as yourself, who have taken their unpaid time

    to see if they can help the other users of the product.

    Good luck...!

  • When I drag and drop a file, it creates a shortcut does not copy the file. I want to copy the file instead create shortcut.

    • Drag
    • drop
    • Drag / move
    • copy
    • short cut
    • create

    If you want to make a COPY of the file you drag (leaving the original where it is and make a copy in the place that you drop the file), and then hold down the control (Ctrl) key on your keyboard while you drag and drop, and she must make a copy in the new location.

    Hold down the ALT key should make a link/shortcut to the original.  Now does no key should MOVE the file from the original location to the new location.

  • How can I register a message of success to a drag and drop interaction - I don't see this option in the Actions on the possibilities of success and it cannot know?

    How can I register a message of success to a drag and drop interaction - I don't see this option in the Actions on the possibilities of success and it cannot know?

    Hide you this way:

  • Automatically open the change step where drag and drop a steptype

    Hello

    I would like to open (launch) Assembly step (labview module) when I drag and drop the step type. TestStand can step edt by the 'Edit' button or shortcut (Ctrl + E).

    Is it possible to do?

    I know that shortcuts are hardcoded...

    Thank you for your help

    Yannick

    Yes, it can be done. See this question recently on the same subject.

  • How to keep the current, when line rollback AM

    Hello
    When I restore the AM, the current line of the VO ALL was lost, how to keep the line being ALL VO?

    who can help me? Thank you very much!

    Hello

    See [this post | http://forums.oracle.com/forums/thread.jspa?forumID=83&threadID=953872] and the last response to me has the answer to your question

    Jean Lou

  • I want out emails in folders of ordinary files, but when I drag-and-drop, the "modification date" gets changed. How I can still see the date?

    To archive my e-mail files until I decided to switch to Thunderbird, I create regular folders in windows and drag and drop emails to outlook express in the appropriate folders. The "update" column displays the original date of the email... which is what I want to do with Thunderbird. In my view, that he treats it as a new file created today... that is not good for my archiving system of these professional work files that I need to find often in approximate date.

    I understand the forum that it is by default in Thunderbird. There is an add-on that can do what I'm doing?

    Thank you in advance,
    Netwon

    I think the reason what OE is the original date because each message is stored in a single file, while TB stores all messages in a folder in a file, an mbox file. Thus, when you save a message as a single eml file, its 'modification date' corresponds to the eml file date was written in the mbox file.

    You can find the ImportExportTools add-on useful because it allows you to add the date of the e-mail eml file name when enamel is exported ("Save selected messages" of the message right-click menu).

  • Can you please tell me how I arrange and move the images in a folder like in XP, when I drag and drop a picture, it comes down to its original position

    Organize and rearrange the images in a folder named as in XP. You could organize by date, size, etc. and do drag and drop all in a folder, it is not possible in Windows 7

    Hi Halohodge,

    Welcome to the Microsoft Answers site!

    You can't manually rearrange files/images by dragging them in the folder in Windows 7. This change is design in Windows 7.

    If you have concerns or comments with respect to the question or any other Microsoft application, please see the links below and send the same:

    Microsoft Connect
    http://connect.Microsoft.com/

    Comments for Windows 7

    If you are referring to the reorganize by date, size, etc. then you can always do than simply right click and selecting the option of sort by in the drop-down list when it appears in the photo or file folder.

    Concerning
    Varun j: Microsoft Support
    Visit our Microsoft answers feedback Forum
    http://social.answers.Microsoft.com/forums/en-us/answersfeedback/threads/ and tell us what you think

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I allow a learner to examine one created Drag and Drop Quiz to show to the learner their incorrect answers or correct?

    Captivate 8: I created an assessment with two multiple choice question slides and 8 drag and drop question slides. After that the learner views their score, I wish they were able to examine all their answers to see where the mistakes were made. Currently, the revision quiz shows that their answers and the correct answers to multiple choice question slides. Ideally I'd like a review of question slides slide - déposer where the incorrect choices appear in red or something to that effect. I appreciate any insight and suggestions!

    Sorry, D & D are not a normal question slide and I can't recommend a feature request registration. I would really be able to choose if an interaction is reset or not, because this problem is not just for D & D but for all interactions of training as well.

  • How to go to the next slide during Drag and Drop

    I'm trying to go automatically to the next slide after the user makes a three 'drop zone' drag and drop.

    I see the action on the successes in the Panel. I chose to go to the next slide, but nothing happens after I have test.

    I also put in place the right answers for the drop areas three and thought that could trigger the part of "success."

    but still nothing happens.

    Any thoughts?

    Hi again,

    I understand, but in order to move to the next slide automatically the drag and drop must be introduced. It doesn't matter whether or not you include your drag and drop in a quiz. The option to send automatic drag / move it will include not a quiz, is to check if the answers are correct or not. You can leave to include it in an unchecked quiz.

    Thank you!

  • How to make the clip video symbols communicated once I drag and drop them in place

    Hello all and kglad, I have a problem with the actionscript code that was given to me which works very well but the only problem is that once I drag and drop the movie clip symbol it will not release the symbol in the case of sum I send you the code and someone please help this project is hot on my plate.

    See code below:

    f (subject2);

    function f(mc:MovieClip):Void {}
    mc.onPress = function() {}
    {if(!this.index)}
    This.index = 1;
    } else {}
    This.index ++;
    }
    var d: Number = this._parent.getNextHighestDepth ();
    this.swapDepths(d+1);
    var mcDup:MovieClip = this.duplicateMovieClip (this._name + this.index, d);
    this.startDrag ();
    f (mcDup);
    }
    mc.onRelease = function() {}
    this.stopDrag ();
    }
    }

    Seal55

    You must add:

    mc.onRelease = mc.onReleaseOutside = function() {}
    this.stopDrag ();
    }

    However, I find it odd that you set the anonymous functions inside another function that is a very bad strategy.

    Something more like this would be better, I think:

    function f(mc:MovieClip):Void {}
    mc.onPress = handlePress;
    mc.onRelease = handleRelease;

    mc.onReleaseOutside = handleRelease;
    }

    function handlePress() {}

    {if(!this.index)}
    This.index = 1;
    } else {}
    This.index ++;
    }
    var d: Number = this._parent.getNextHighestDepth ();
    this.swapDepths(d+1);
    var mcDup:MovieClip = this.duplicateMovieClip (this._name + this.index, d);
    this.startDrag ();
    f (mcDup);
    }

    }

    function handleRelease() {}

    this.stopDrag ();

    }

  • Tip action to show only a previous button on a slide so the learner clicked on the button Submit on Drag and Drop

    I am a user of long date Captivate and have dabbled with advanced Actions and Variables, so know just enough to get me in trouble. Hoping someone can help me with what I hope is a simple tip action:

    I am currently using CP8 and created a training where learners click on a map of building to go to different "rooms" to complete an interaction drag-and - déposer a certain topic related HR. The problem is that some of my learners test forget what 'rooms' they have already read and will click on those they have already visited. I added a back button, so that they can return to the map if they made a mistake, but now they are able to leave the slide without completing the interaction drag and drop.

    Basically, I need to hide the back button unless the learner has already completed (for example, the user clicks on the button submit to) the Drag and Drop interaction, but I'm not sure how to set up. Can anyone help?

    Thank you!

    Hide the button back to begin with. A tip action can be triggered by an event the success and failure of the & slipped. I guess that you will need at least two commands:

    • View the "back" button
    • Go to the next slide.

    It seems the simplest solution. You can also ignore the slide D & D when they enter a second time, but then you will need a Boolean variable to be turned on/off by these same events and a conditional action on which checks this variable and immediately jumps to the next slide when it is set to 1.

  • Is it possible to reduce the "suction" items fall dragged and drop?

    I am developing a game where the user must correctly space objects between them depending on what is their relationship to each other.  Falling objects are in fact completely transparent, and the user must place the point slide perfectly on top of it. The problem is that when the user does not place the object from sliding directly on top of the object to be moved, it nevertheless gets pulled to this object. 1. I want that there is virtually no traction power.  2. I would also like the user to be able to stream, click on the object to move and move it slightly until he thinks it's perfectly fine and the stay of the object where it let him down - I don't want it pulled back to its origin.

    If possible, let me know!

    Thank you!

    Ryan

    Hello

    It is possible to redrag and withdraw the power of pull by setting the following two parameters.

    1 Select the Target Drop, Drag and Drop Panel > accordion target Drop, change of position as "absolute".

    2. activate the option "Source Redrag dropped" to drag and drop the Panel > accordion Interaction properties.

    But with these parameters, it allows to drag the object even when it is removed properly.

    Thank you

    VERALINE Sukumaran.

Maybe you are looking for