|
Post by TheFeDuke on Feb 8, 2016 2:20:44 GMT -5
I do most of my editing on removable media on a desktop and laptop with different screen sizes, resolutions, font sizes and drive letters. My feeble eyes seek maximum readability. The open tabs don't travel well on different drive letters when I move outside in good weather. I use a desktop shortcut to a batch startup script on my flash drive using a working directory pointing to my data in a minimized window. Here is the batch script:
SetLOCAL EnableDelayedExpansion Set "Drive=%~d0" Set "DriveLetter=%Drive:~0,1%" Set "PortableSPF=SPFLite.V8.3.6022" PushD %Drive%\%PortableSPF%\Config >nul Copy SPFLite_Drive%DriveLetter%.INI SPFLite.INI PopD Call "%~d0\SPFLite.V8.3.6022\SPFLite.exe" PushD %Drive%\%PortableSPF%\Config >nul Copy SPFLite.INI SPFLite_Drive%DriveLetter%.INI PopD pause
The name of the portable SPFLite directory is a variable and the drive letter is determined by the location of the batch script. SPFLite.ini is restored to its state at last use on this PC and is harmless on first use. SPF starts and can use the working directory for the RUN command. SPFLite.ini is saved after SPFLite exits. If SPFLite does not terminate properly or the startup window is closed while SPF is running, the saved .ini will not have the most recent session changes. If SPF is started normally the saved .ini is not referenced during that session and the next startup shortcut will not reflect that activity.
This won't appeal to a large audience, but it saved me lots of OPTIONS commands and error messages opening non-existent tabs. Regards, John A.
|
|
|
Post by TheFeDuke on Feb 8, 2016 11:57:57 GMT -5
On that thought, one message, stating that "a number" of previously open files are missing would reduce traffic. I did use the individual messages to note what files I could re-open. I don't see much value there.
This sort of .ini file manipulation takes care of the system specific settings and as such has no use in the system installed SPFLite, except for history data. I just got intrigued enough to pursue a pre-process to communicate data with my Windows XP back-level SPFLite. The above scheme does support three-way sharing using the back-level portable version.
|
|
|
Post by George on Feb 8, 2016 13:00:03 GMT -5
I'm not entirely clear what's wanted here. Is it a way to avoid a file re-open attempt? If so, why not try invoking SPFLite with a commandline operand of a filePATH - not a fileNAME. e.g. SPFLite "D:\Documents\Data Folder\"
This will trigger SPFLite to ignore the previous open list and open up in File Manager pointing at the desired Data Folder.
Or have I totally missed the point?
George
|
|
|
Post by TheFeDuke on Feb 8, 2016 17:12:38 GMT -5
I'm not entirely clear what's wanted here. Me, too. I thought that I was trying to offer a contribution on the remote chance that it might help someone, not raise an issue or enhancement request. Now that I have been thought provoking, I see that you want to help, too. Discussion is good. When files can't be reopened, because of a drive letter change, can the previous SPFLite drive be saved, with option to translate the drive letter of previously opened files to the current SPFLite portable drive if they are the same as the previous SPFLite location? An example might help. I run SPFLite Portable on system 'A' from drive 'K:' and SPFLite remembers. I open files on drives 'K', 'G' and 'C', leaving them saved and open when I exit. On to system 'B' where the portable media is referenced as 'J'. Before SPFlite looks to save the information that it is running on 'J', an inconsistency is detected with the previously stored SPFLite location. Coincidence will dictate the previous activity for files on 'G' and 'C' as it does at present, but there is now an opportunity to translate the 'K' files to 'J' before opening and saving 'J' as the new 'last run from' drive letter. What might you think of that? Just to mention that I avoided using using SUBST in my solution to assign a consistent drive letter on different systems because of other considerations. Regards,
|
|
|
Post by George on Feb 9, 2016 11:29:51 GMT -5
SPFLite does not think in terms of 'last used drive LETTER', the previously opened file list is a list of full, complete pathnames. I think you're asking for it to sort of match the filenames of unlocatable previous files against the current running PATH and see if a compatible path/file can be found. I don't think treating a saved, complete filename as a 'see if something like this is around' request is a good idea.
Again, if I've gotten lost here, please correct me.
George
|
|
|
Post by TheFeDuke on Feb 9, 2016 13:27:31 GMT -5
I was trying to offer a contribution on the remote chance that it might help someone. Leave it at that, then. None of this is for the standard user and this thread has likely already exceeded its potential audience just with your comments. I used to have standard SPFLite desktop shortcuts and my project testing environment shortcuts. By rolling a simple call to SPFLite into the latter, I can seamlessly test batch scripts with the RUN command in SPFLite and have access to my CD, PATH and stock environmental variables. Happiness is. Thanks, again, and I'll be back
|
|