Jump to content
UBot Underground

Rename file command


Recommended Posts

I've had success using this feature before, but I can't get it to work in my current bot.  Here's what I'm trying to do.

 

I create a list of folders and then in each folder I create a list of multi-page pdf files.  Then, I use TJ's PDF splitter to make them single page files in each folder. I then convert each pdf to txt and scrape some of the data to use to rename the single pdf page.  I delete the txt and then try to rename the pdf file with the scraped data.  Most of the time I'm getting the error message "The process cannot access the file because it is being used by another process."  The only thing I have open accessing the file is ubot, so it isn't something else.  It seems to be keeping the file open in a cache or something and it won't let me rename.  Does anyone know of a workaround?

Link to post
Share on other sites
  • 2 months later...

The problem is that one process is locking the files, which makes them inaccessible for other processes (for example this will also happen if you'll be saving to one file fast).

 

To solve this you'll have to figure out why files are still locked and remove the lock (stop using the file) once you want to read/write that file from another process.

Link to post
Share on other sites
  • 2 weeks later...

To solve this you'll have to figure out why files are still locked and remove the lock (stop using the file) once you want to read/write that file from another process.

 

The problem is occurring when I convert the pdf to txt and try to rename the pdf.  For some reason, I can rename the txt file I just created, but not the pdf I created it from.  Does anyone have any help they can offer to unlock the original pdf file?

Link to post
Share on other sites

The problem is occurring when I convert the pdf to txt and try to rename the pdf.  For some reason, I can rename the txt file I just created, but not the pdf I created it from.  Does anyone have any help they can offer to unlock the original pdf file?

According to what you say I think that pdf file is still in use when you try to rename it. If plugin uses container for pdf you should for example rename the pdf outside of that container.

 

Since I don't have that plugin I suggest you try to contact the plugin developer, TJ.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...