jaclaz Posted March 14, 2015 Share Posted March 14, 2015 So - as expected - you don't really need to set the variable at all and additionally you have no particular limitation in the complexity or length of the command string. jaclaz Link to comment Share on other sites More sharing options...
Outbreaker Posted March 14, 2015 Author Share Posted March 14, 2015 (edited) I'm using this command multiple times and it makes it easier to edit and to find typos and i will also using this code in a different scenario. Edited March 14, 2015 by Outbreaker Link to comment Share on other sites More sharing options...
Yzöwl Posted March 14, 2015 Share Posted March 14, 2015 Surely that's what the [strings] section is designed to do![Strings]EmptyFolder = "PathTo\MyDir"Then you may be able to just do this!PUSHD %EmptyFolder%&&RD/S/Q %EmptyFolder% Link to comment Share on other sites More sharing options...
jaclaz Posted March 14, 2015 Share Posted March 14, 2015 Then you may be able to just do this!.. and thus here goes yet another demonstration of the futility of falling in the xyz issue, if Outbreaker had since the beginning explained what his ACTUAL GOAL was and provided the needed context information, not only he would have had a valid solution faster, but it would have been better and simpler. jaclaz Link to comment Share on other sites More sharing options...
bphlpt Posted March 14, 2015 Share Posted March 14, 2015 Well, you are in the (common BTW) issue of mis-communicating, the known xyz or the chocolate covered banana:http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/put-down-the-chocolate-covered-banana.html You want to reach a goal, but you do not specify it and ask a question related to a tiny bit of what you believe to be the way to reach that goal (which may or may not the "right" way)...Am I missing something?...Not yet. Till now the usual screenplay has been followed to the letter:someone asks something about batchjaclaz provides a possible solutionYzöwl provides another (often better) one at this point normally Gunsmokingman enters the scene and posts a .vbs to the same effect of the batches/snippets posted earlier,...Strangely, I think I really am missing something! ...the point!...You are not missing it , it simply does not exist , the whole point of the game, when played outside common rules, is to continuously shift the actual question towards something else at each iteration. The original question made some sense, but as soon as a "normal" solution (actually two) were proposed, the question became different (having no actual practical use) and I suspect that even the modified question has very little in common with the actual goal/expected result/intended use, hence the reference to the xyz issue.......but you're setting a variable for no reason...I am still failing to see the actual practical use of this command, I mean is it to be included in a batch file or - as it seems - it is intended to be typed on the command line?...So - as expected - you don't really need to set the variable at all and additionally you have no particular limitation in the complexity or length of the command string....Then you may be able to just do this!..... and thus here goes yet another demonstration of the futility of falling in the xyz issue, if Outbreaker had since the beginning explained what his ACTUAL GOAL was and provided the needed context information, not only he would have had a valid solution faster, but it would have been better and simpler. LOL GSM and I have had similar "adventures" with Outbreaker, with similar results. Unfortunately, this thread was indeed as expected. Cheers and Regards Link to comment Share on other sites More sharing options...
Redhatcc Posted March 15, 2015 Share Posted March 15, 2015 Throwing this in the mix. Put the echo first then set.@echo off echo|set /p"FN=FolderName"Pause Link to comment Share on other sites More sharing options...
Yzöwl Posted March 15, 2015 Share Posted March 15, 2015 Throwing this in the mix. Put the echo first then set.@echo off echo|set /p"FN=FolderName"Pause …unfortunately however, the actual task did not involve outputting anything at all to the screen! Oh and also Outbreaker, since you are invoking the commands from an inf, there should also be no reason why you need to join all of the commands into a single line.11,,cmd.exe,,,"/Q/C ""FOR /F ""DELIMS="" %A IN ('DIR/B/AD ""%ProgramFiles%\Software\temp\""') DO RD/S/Q ""%A"""11,,cmd.exe,,,"/Q/C ""DEL/F/Q/A ""%ProgramFiles%\Software\temp\*.*""" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now