Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Variables in Custom Actions #70

Open
BzowK opened this issue Jul 22, 2013 · 0 comments
Open

Using Variables in Custom Actions #70

BzowK opened this issue Jul 22, 2013 · 0 comments

Comments

@BzowK
Copy link

BzowK commented Jul 22, 2013

Hey All -
I'm trying to create a Custom Action which will detect RAR files, Extract them to a folder named after the RAR filename, then move the file to an archive folder.

I created a batch file which creates the folder and extracts the contents to it, but variable most of the time won't move the file afterwards as when I try manually deleting the file I cannot as UnRar.exe has it. Since Belvedere keeps running, it will keep adding UnRar.exe processes until I disable the rule :(. It seems that perhaps the file isn't finished extracting before trying to move however adding a timeout didn't help the situation.

It would really help if there was an variable I could use in my batch scripts which Belvedere refers to the found files OR a way to make the rules only run once per found file.

Any Ideas? Here's the script I am trying to use in Custom Actions:

path=%path%;C:\Program Files\WinRAR
setlocal
set rarFile=%1
set rarfilename=%~n1
mkdir "C:\Downloads"%rarfilename%""
unrar x "%rarfile%" "C:\Downloads%rarfilename%"
move "C:\Downloads%rarFile%" "C:\Downloads\Compressed"

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant