Please consider converting the workspace control files to an open format.
Either change the format to XML, publish the file spec or provide a utility to list the embedded information.
An XML format would allow us to edit the file list when a directory is renamed.
TWS file format
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: TWS file format
TextPad's workspace files are saved in the most compact and fastest format possible.
The path to document file names is stored relative to the folder containing the WSP file (unless they are above it or in a different path). Hence, you can move the whole directory tree to another location and the files in the workspace can still be opened.
If you use the File/Rename command to move a file to a new location, that change will be saved in the workspace.
Unfortunately, this does not help if you rename a directory or file outside of TextPad.
The path to document file names is stored relative to the folder containing the WSP file (unless they are above it or in a different path). Hence, you can move the whole directory tree to another location and the files in the workspace can still be opened.
If you use the File/Rename command to move a file to a new location, that change will be saved in the workspace.
Unfortunately, this does not help if you rename a directory or file outside of TextPad.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Re: TWS file format
I posted a Python script that lists the names of the document files in a workspace file here:
viewtopic.php?p=45822#p45822
viewtopic.php?p=45822#p45822
Re: TWS file format
You did indeed, for which I thank you.
I also have a (rather less concise) PHP script that I used to study the TWS format and which can also output the file list.
I am just thinking that it would be nicer if the TWS file was editable.
If I rename a project that is referenced in one or more TWS files, then loading one of those TWS files causes TextPad to silently remove the (now invalid) references.
Perhaps a "cheaper" option would be a once-only (copyable) message that lists the "lost" files.
I also have a (rather less concise) PHP script that I used to study the TWS format and which can also output the file list.
I am just thinking that it would be nicer if the TWS file was editable.
If I rename a project that is referenced in one or more TWS files, then loading one of those TWS files causes TextPad to silently remove the (now invalid) references.
Perhaps a "cheaper" option would be a once-only (copyable) message that lists the "lost" files.
Re: TWS file format
Not directly applicable, but in case you're not aware, the Edit/Copy Other/All File Names command will place the fully qualified names of all the files currently open on the clipboard.
Also, if you paste and save them in a file, say wspfiles.txt, then use the Quick Open command (Ctrl+Shift+O) to open it as "@wspfiles.txt", all the files in it will be opened instead. You can also use an @-file as a runtime parameter when starting TextPad.
Also, if you paste and save them in a file, say wspfiles.txt, then use the Quick Open command (Ctrl+Shift+O) to open it as "@wspfiles.txt", all the files in it will be opened instead. You can also use an @-file as a runtime parameter when starting TextPad.