Search found 38 matches
- 30 Jun 2019 08:19
- Forum: DOS Batch Forum
- Topic: [Resolved] Moving incrementally named files to three different directories, evenly
- Replies: 2
- Views: 4563
Re: Moving sequentially named files to three different directories, evenly
Not sure what "sequentially named" and "image files" means in particular because you didn't provide any example. If you are only looking for the math, then it's quite easy. for /f %%i in ('dir /a-d /b *.jpg^|find /c /v ""') do set /a "third=%%i/3, remaining=%%i-2*third" echo %third% %third% %remain...
- 30 Jun 2019 06:59
- Forum: DOS Batch Forum
- Topic: [Resolved] Moving incrementally named files to three different directories, evenly
- Replies: 2
- Views: 4563
[Resolved] Moving incrementally named files to three different directories, evenly
Hi, Been a while since I last posted. Sorry to come asking for help like this but after something unfortunate that occurred (family related) it's found me needing a way to move a directory of sequentially named images (that vary in total number depending on the export to that directory) from a direc...
- 01 Dec 2017 12:24
- Forum: DOS Batch Forum
- Topic: Storing input strings within batch script file itself
- Replies: 3
- Views: 3155
Re: Storing input strings within batch script file itself
As ShadowThief said you can append lines to a running script. *snip* Steffen Thanks for the suggestions and example. Very much appreciated. Will probably use this method for now. Was also thinking it might be possible by either splitting the original batch script into different pieces in separate f...
- 30 Nov 2017 00:04
- Forum: DOS Batch Forum
- Topic: Storing input strings within batch script file itself
- Replies: 3
- Views: 3155
Storing input strings within batch script file itself
Inquiring to the helpful minds here to see if there's a way of storing user input in a batch script itself, by writing to the file in a specific position. Essentially the concept is to allow a user to store certain key settings such as program paths by dragging them into the batch script window and ...
- 14 Oct 2016 14:57
- Forum: DOS Batch Forum
- Topic: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
- Replies: 6
- Views: 7071
Re: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
It's possible but not in all cases. Exclamation marks needs three carets, but only when they are not quoted. for one percent sign you need four percent signs . But at all you should avoid CALL with content by value, better put the content into a variable and then use by ref So am I understanding it...
- 14 Oct 2016 01:33
- Forum: DOS Batch Forum
- Topic: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
- Replies: 6
- Views: 7071
Re: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
Running into a bit of an issue with some related code. At the top of my script I allow for setting a variable in the .bat file itself to define a custom path for use later on in the script. If the hard-coded variable contains percentage or exclamation marks they're stripped. Tried using similar for ...
- 13 Oct 2016 18:23
- Forum: DOS Batch Forum
- Topic: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
- Replies: 6
- Views: 7071
Re: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
Hi koko, I suppose that you can solve most of your problems by using FOR /F "delims=" %%a in ("!input!") Only the exclamation marks needs to be handeled with the toggling delayed expansion technic. Perfect! Thanks a bunch, and for all the useful tips you and others here have sha...
- 13 Oct 2016 01:19
- Forum: DOS Batch Forum
- Topic: Splitting a variable string containing poisonous characters into parts (filename/path/etc)
- Replies: 6
- Views: 7071
Splitting a variable string containing poisonous characters into parts (filename/path/etc)
Thanks to jeb's answer over on ss64.org I was able to finally get around the cmd.exe limitation of handling of ampersands (&) in input paths that contain no spaces (it only affects files drag-and-dropped onto batch scripts or sent via the Send to context menu). However I need to be able to also ...