Search found 8 matches
- 10 Dec 2017 10:16
- Forum: DOS Batch Forum
- Topic: Move Folders with More than Two Files
- Replies: 3
- Views: 4279
Re: Move Folders with More than Two Files
to the parent directory Parent directory of what? Of the folder with the 1000 sub directories? @echo off &setlocal for /d %%i in (*) do ( for /f %%j in ('dir /a-d /b "%%~i\"^|find /c /v ""') do ( if %%j==2 move "%%~i" "%cd%\..\" ) ) ... saved in the folder with the sub directories you want to check...
- 09 Dec 2017 23:12
- Forum: DOS Batch Forum
- Topic: Move Folders with More than Two Files
- Replies: 3
- Views: 4279
Move Folders with More than Two Files
Hi all! I have a folder that has about 1,000 sub folders in it. Some of them have only 2 files, the others have more than 2 files. I want to move all the ones with only 2 files, to the parent directory (or to a specific directory if that is easier). Thanks in advance - assuming this is even possible...
- 25 Jan 2016 00:30
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2168445
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
I was directed here when I asked a question about something but they weren't sure if this did what I need or not. What I have are two files, they are settings files for a program I use. I edit the settings on my end and I need end users to be able to put my files with theirs and run the bat to repla...
- 21 Jan 2016 11:57
- Forum: DOS Batch Forum
- Topic: Use Relative path in Batch file?
- Replies: 5
- Views: 9039
Re: Use Relative path in Batch file?
kwsiebert wrote:Is there anything else in your batch file? Both of the lines you posted give the correct results when I test them myself.
Nope just that, and it says The syntax is wrong.
I tried it again and it's working...I must have had an extra character in there
Yay! Thanks all.
- 21 Jan 2016 10:22
- Forum: DOS Batch Forum
- Topic: Use Relative path in Batch file?
- Replies: 5
- Views: 9039
Re: Use Relative path in Batch file?
Thanks guys, I will try it out. I should have mentioned I am not a coder of any type so all of this stuff for me is lots of googling and figuring things out So, Is should be able to use %~dp0 for the second path as well? The file is alwasy located where I place the bat file. I will try it out after ...
- 20 Jan 2016 15:09
- Forum: DOS Batch Forum
- Topic: Use Relative path in Batch file?
- Replies: 5
- Views: 9039
Use Relative path in Batch file?
So what I have is a simple batch that copies a file in a folder into all the other folders within that folder. It works fine, but I want to use relative paths of the batch files location, therefore wherever I put the batch file it will copy the file into all the folders in that location. Here is my ...
- 30 Nov 2015 18:33
- Forum: DOS Batch Forum
- Topic: Multi file rename entire directory to a set list of names?
- Replies: 4
- Views: 4609
Re: Multi file rename entire directory to a set list of names?
Thank you for this I will check it out and report back
- 29 Nov 2015 21:48
- Forum: DOS Batch Forum
- Topic: Multi file rename entire directory to a set list of names?
- Replies: 4
- Views: 4609
Multi file rename entire directory to a set list of names?
This is hard to explain but I currently have a folder full of files that I constantly have to rename to certain names. Currently I rename all my files with a batch renamer to set filenames that I then run a batch file to rename them, but it's tedious. I would like to be able to rename them to the se...