topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 17, 2019, 02:35 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tuxman [ switch to compact view ]

Pages: prev1 2 3 4 [5] 6 7 8 9 10 ... 89next
101
The full path is handled as a string (and split between path and filename and, optionally, extension during processing). I admit that some features can be confusing even to me.  ;D

So here's how it is intended to work:

  • remv "a" "b":
    The current directory is processed, all sub-directories are ignored. Folders won't be touched at all.
  • remv -r "a" "b":
    The current directory and all of its sub-directories are processed. If a path matches, it will be renamed.
    - a.txt will be renamed to b.txt
    - a\some.txt will be renamed to b\some.txt fixed with 1.3.0
    - However, a\ alone won't be renamed to b\ if no files match.
  • remv -dr "a" "b":
    The current directory and all of its sub-directories are processed. If a path matches, it will be renamed.
    - a.txt will be renamed to b.txt
    - a\some.txt will be renamed to b\some.txt
    - a\ alone will also be renamed to b\ if no files match.

 :-[

102
Yes, it does - so you can match subfolders.  :)

I don't know if you noticed but it was suggesting directory name changes even though I hadn't specified the -d parameter.

If they are a part of the path to a regular file, yes. You cannot rename a whole directory without a file in it though.
I could make the non-d call skip subfolders, but then -d would be the same thing as not using -r, or am I mistaken?

103
Years after everyone who needed that had already joined the superior Bitbucket.  :)

104
Nice. I haven't really done much with the PowerShell yet.  :Thmbsup:

105
Hmm, that might be fixed with a simple call to create_directories before renaming, so the target directories will be created even if the original directories didn't match your regex. But that would lead to empty folders when the files from them have been moved.

I'm currently experimenting a bit:

> .\a.exe -Erv "remv" "romv"
 Renaming       '.\remv.hpp' to '.\romv.hpp' ...
   error [rn]: operation not permitted
 Renaming       '.\remv.cpp' to '.\romv.cpp' ...
   error [rn]: operation not permitted
 [STATS] Renamed 0 files (2 failed, 4 skipped).

> .\a.exe -rv "remv" "romv"
 Renaming       '.\remv.hpp' to '.\romv.hpp' ...
 Renaming       '.\remv.cpp' to '.\romv.cpp' ...
 [STATS] Renamed 2 files (0 failed, 4 skipped).

Something about the -E flag is fishy.  :huh:
I'll look into it tomorrow or on Monday (I'm visiting friends over the weekend). Attaching version 1.2.1 with a broken -E flag above for the time being.

106
"-vv" shows more stats indeed. This is intended. :)
OK, the newline is ugly, granted...

107
Version 1.2.0 should recurse backwards.  :-[

108
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 09, 2019, 02:42 PM »
It works fine here. :(

109
Why do I even publish software one year in advance if people don't test it before it's too late?  ;D

Not renaming the .exe would require to write one function per platform, as C++ does not have a cross-platform way to find the "current .exe path" as far as I know.  :huh:
Coming closer with version 1.2.0... (attaching above.)

110
Never heard of that! Too late now - damn.

111
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 09, 2019, 10:48 AM »
 :huh:

I hate everything.
Will look at it... after having updated remv which will happen, uhm, maybe today.

112
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019 Begins
« on: January 08, 2019, 09:55 AM »
It can be one as well.

113
Now, now.

> .\a -Evv "hpp" "npp"
 Processing '.\a.exe'.
 Processing '.\constants.hpp'.
 Processing '.\filestats.hpp'.
 Processing '.\help.hpp'.
 Processing '.\remv.cpp'.
 Processing '.\remv.hpp'.
 [STATS] Renamed 0 files (0 failed, 6 skipped).

> .\a -vv "hpp" "npp"
 Processing '.\a.exe'.
 Processing '.\constants.hpp'.
 Renaming     '.\constants.hpp' to '.\.\constants.npp' ... Successfully renamed .\constants.hpp to .\.\constants.npp.
 Processing '.\filestats.hpp'.
 Renaming     '.\filestats.hpp' to '.\.\filestats.npp' ... Successfully renamed .\filestats.hpp to .\.\filestats.npp.
 Processing '.\help.hpp'.
 Renaming     '.\help.hpp' to '.\.\help.npp' ... Successfully renamed .\help.hpp to .\.\help.npp.
 Processing '.\remv.cpp'.
 Processing '.\remv.hpp'.
 Renaming     '.\remv.hpp' to '.\.\remv.npp' ... Successfully renamed .\remv.hpp to .\.\remv.npp.
 [STATS] Renamed 4 files (0 failed, 2 skipped).

Granted, the ".\.\" part looks inconvenient, but good enough.  ;D
I'll look into it on Wednesday again. Checking in, updating the RAR and leaving you alone for today/tomorrow. :)

114
 :huh:

You truly make me sad. I'm on it (but off tomorrow)...
I'll report back.

115
To come back to 3.: I use the standard C++ regex header. Technically, $0 is supposed to work.  :huh:

1. is fixed (I removed the reference).  ;D
2. Head -> wall.
4. is actually already in, just skip the -r flag and remv will gladly ignore directories.
5. is fixed as well (new flag "-E").

116
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 07, 2019, 01:30 PM »
Updated, gladly ignoring the Internet Explorer.  :P

117
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019 Begins
« on: January 07, 2019, 01:01 PM »

118
1. Yes, thank you.
2.  :huh: I'll check that.
3. If you use invalid variables, that's not my fault.  :D
4. The possibility to include relative folder paths (to move whole structures) is actually a feature. How would you do that?
5. File extensions are technically not a separate part of a file name. Handling files with multiple endings (.tar.gz) could be tricky...

Note that I'll have to fix the Decision Sieve first anyway, so take the above comments as temporary ideas.  ;D

119
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 07, 2019, 01:43 AM »
No, it actually is untested.  ;)

120
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 06, 2019, 02:03 PM »
OK, this browser is untested.  :huh:

I shall try tomorrow (after work)...

121
I merged a pull request today, fixing a few potential crashes.  :Thmbsup:

122
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 05, 2019, 11:47 PM »
Good point. I'll add an Undo button tomorrow or so.  :up:

123
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 05, 2019, 10:29 PM »
I feel physical pain.

124
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 05, 2019, 10:11 PM »
I have just noticed that the "supported OS" field said that you'll need a C++ compiler. Oh man...  ;D
Fixed.

125
N.A.N.Y. 2019 / Re: N.A.N.Y. 2019: The Decision Sieve
« on: January 05, 2019, 10:09 PM »
Hmm, the general idea of a sieve is that some things will be removed from what is fed into it. Is there a use case for restoring everything?

The only reason I could imagine is that you are unhappy with the results, but then, why did you use it anyway?

 :huh:

Pages: prev1 2 3 4 [5] 6 7 8 9 10 ... 89next