Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Refactor file renaming logic
Browse files Browse the repository at this point in the history
  • Loading branch information
langningchen committed Dec 23, 2023
1 parent f39ef11 commit 650a32d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CMake on a single platform
name: CMake
on:
push:
branches: [ "main" ]
Expand All @@ -18,5 +18,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: build
name: MultiRename.exe
path: ${{github.workspace}}\build\Release\MultiRename.exe
6 changes: 2 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool operator==(FILE_INFO a, FILE_INFO b)
}

std::string CurrentDir = "C:";
std::string Pattern = "[F]";
std::string Pattern = "[D]/[F]";
std::vector<FILE_INFO> FilesToRename;
std::vector<std::pair<int, std::pair<int, int>>> Indexes;

Expand Down Expand Up @@ -433,9 +433,7 @@ std::string ProceedRename(const FILE_INFO &File)
else
Position++;
}
if (NewName.length() > 32)
NewName = "Name too long";
return File.Directory + "/" + NewName;
return NewName;
}
void Rename()
{
Expand Down

0 comments on commit 650a32d

Please sign in to comment.