Delete imported webpage without opening Scrivener?

I imported a webpage into my research file that crashed Scrivener. I imported it set to use the embedded browser. It got stuck importing at 84% and Scrivener stops responding. Closing the program and reopening goes straight to that webpage it is attempting to import and crashing immediately. Is there a way to find and delete the link to the page it is trying to import without actually opening Scrivener?

I ended up having to make a whole new project and pasting in all of the text from the original. I would still like to know how to delete an imported webpage that is causing Scrivener to freeze/crash before any of the internal tools to delete it (move to trash, shift+del, etc.) can be used. While I did not loose any of the important text files, I did loose my entire research folder since it was mostly webpages imported using the embedded browser. Luckily, I had a copy of everything in Evernote, but the whole point of Scrivener is to have it all in one place.

Scrivener saves everything in folders under the project. I’m not a programmer, so I don’t know how it could be fixed to do so via Scriv itself (maybe have an option to Open at Top Level so it isn’t directly starting with a bad file, would that work?).

However, I would think that with a good search of the project directory on a string from the webpage in question would find the file and you could delete it. That would probably make Scriv angry in some other fashion, but it would probably forgive you a little easier than having to rebuild the project from scratch. It’s certainly NOT the recommended way to do it, but would be what I’d do first just to see if it saved me some other word.

I think in the future this is where backups are your friend. Because if you back up before doing a lot of importing, then you can at least roll back to the last backup. If you have auto-backups set up, at worst you’d have to reset to the last time you’d closed the project.

Jen

I’m not a programmer. However, I just did a quick check of the documents for one of my projects and I do not believe that the URLs created by importing to the embedded browser are stored in your project’s directory (as was previously suggested). My best guess is that they’re stored in the binder.backup file. This file can’t be read or modified by the user.

In any event, you didn’t provide enough information about what happened and how you went about creating a “whole new project,” rather than working with the original. In your previous post you said:

How did you create a new project if the program stops responding when you reopen it?

Since I’m not sure whether you still have the original project (where you can retrieve your research folder), I’ll make a few suggestions for future reference.

You can change your preferences under General: Startup Options by deselecting “Open recent projects on program launch.” This will prevent Scrivener from crashing if there is a problem with the last document you had open. However, it will still crash when you open the project with the improperly functioning webpage.

To delete the link to the page Scrivener is trying to import, you can try using your software firewall – assuming you have one installed. If you set your firewall to “block all traffic” before opening Scrivener, then the webpage can’t load. Once the project has opened, you can just delete the URL from the binder. This works (I tested it) because when you use the embedded browser, Scrivener downloads the webpage each time you click on the URL’s document name within the binder. If it can’t download the webpage, the project will just open with the webpage document empty.

One other suggestion is to stop the webpage when it first gets stuck downloading. If you right-click on the document window (not the file name in the binder) while it’s downloading you can select “stop,” which may prevent Scrivener from freezing.

These are the only workarounds I can think of (other than keeping backups of your project, as was previously suggested). Maybe someone else knows of another way to delete the URL outside of Scrivener.

To create a new project, I opened a different project and set the preferences to not open the most recent project. That part was easy.

I did not think to simply disconnect from the internet :unamused: I will try that and see if I can get the original project working again.

I did have backups. Not sure what is going on with them but they were all blank. It might be a bug having to do with storing my backups on an external drive. All my backups were blank including those for other projects. I turned off all of the backup related settings, changed to a folder on my internal hd, restarted, then turned them all back on. My newest backups are fine.

Thanks for the help!

Sorry I didn’t get to this one before you went to the trouble of creating a new project, but it should be fixable in your original one if you you don’t mind a quick run in XML. As Liber noted above, webpages that you bring into your project using the “Dynamic Web (Embedded Browser)” option are not actually imported–instead you’re just sticking the URL in your binder and using Scrivener’s editor as a browser (hence the page is still dynamic, since it’s still something on the web that could change or update at any time). So there isn’t a file in your project that you’d need to delete; rather, you need to remove the URL from the .scrivx file. Make a backup of your project before you go messing with this (just right-click on the project folder in Win Explorer and use “Send to \ Compressed (zipped) folder” to do this), then in the project folder open the “project.scrivx” file in a plain text editor and search for the URL of the page that won’t load. If you don’t know that, search for the title you used when you imported it, or, if you’re really stuck, just try looking for “http://” (you’ll probably find a lot of these, but as you look through you may be able to recognize the one you’re after). Once you find the right one, which will be set between “”, just delete that url and save the .scrivx file. You can then open the project and delete the whole item from the binder.

That said, I would just first try disconnecting from the internet and opening the project, as Liber suggested–it will probably still try to load the page, but it shouldn’t hang, and then you can delete the page from the binder (and empty the trash–making sure there’s nothing else in there you want to hang on to) and then just reconnect to the internet. It might feel a little less hackery and awesome, but it’s probably significantly easier. :wink: If it’s still crashing, though, the above method will remove the URL from the project and let you open it successfully.

Also, have you upgraded to 1.0.3? There was an earlier bug with web pages not importing properly–although I think that was actually importing, v.s. dynamic, and I believe that was fixed for 1.0.3, so if you’re on an earlier version it’s probably worth running Help > Check for Updates. I’ll need to go look that one up though as it might not address this issue at all if that was specifically an import issue rather than dealing with displaying the page.

I don’t know how I missed the project.scrivx file when I was checking the Scrivener files for the URLs. I assumed that .scrivx was a proprietary file format.

My Scrivener project folder was set to display as “details” (so the project.scrivx file icon was too small to read), but when I changed the folder view setting to “tiles,” I noticed that it actually says “XML” on the project.scrivx icon.

I just learned a valuable lesson: When you’re trying out new software, always check the output files to see if they’re “readable.” :wink:

All the same, I don’t advise just firing up an XML reader and wreaking havoc with your .scrivx file. Everything hinges on that, so if it gets goofed up, poof! (Well, it’s not quite as drastic as that, but it will require some fixing for you can use the project at all, so let’s pretend it is that drastic.) :slight_smile: Ergo, definitely make a backup of the project before you do anything in there.

I won’t cause a catastrophe, I promise! :laughing: I always save backup copies of all project-related files, to multiple locations, which I would highly recommend to anyone who values their work. Nonetheless, it sure is interesting to check the content of a program’s files (with full knowledge that the files, which could get corrupted, are necessary for the proper operation of the project and/or program) to see how the program works – and to troubleshoot when you run into a desperate situation where some of your work gets lost.