已恢复文件的文件夹缺少名称 - 如何通过文件内容找到我要查找的文件?

发布于 2024-09-06 19:21:02 字数 233 浏览 8 评论 0 原文

我无意中删除了我的文件备份,后来又恢复了。恢复丢失了文件名和位置,我留下了大约 3000 多个 .indd (Adobeb InDesign) 文件。

我的问题是我试图找到我正在处理的 .indd 文件,而不必手动打开每个文件进行检查。

我知道我所拥有的一些单词,我想知道我是否可以使用二进制阅读器来查找 .indd 文件以查找其中一个关键字...我可以用 c# 或其他任何方式构建它

有人有任何想法吗?

I managed to accidentally delete a backup of files I had which I then later recovered. The recovery has lost the files names and location and I am left with about 3000+ .indd (Adobeb InDesign) files.

My problem is I am trying to find the .indd file that I was working on with out having to open each one manually to check.

I know some of the words that I had and I am wondering if I could maybe read the .indd file using a binary reader looking for one of the keywords...I could build it in c# or whatever

Anyone got any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岛徒 2024-09-13 19:21:02

如果常规搜索不起作用,请尝试内置脚本,您可以使用 Javascript、Visual Basic Sc​​ript 或 AppleScript 进行编码。我要使用 JS...

我不是专家,但我从 InDesignCS5_ScriptingGuide_JS.pdf 并对其进行了一些修改:

var folder = new Folder("C:/Path/To/Files");
var files = folder.getFiles('*.indd');

for (var i=0; i<files.length; i++) {
    var file = files[i];  
    open(file):

    var myDocument = app.activeDocument;

    //Clear the find/change text preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

    //Search the document for the string "Important Text".
    app.findTextPreferences.findWhat = "Important Text";

    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = true;
    app.findChangeTextOptions.includeHiddenLayers = true;
    app.findChangeTextOptions.includeLockedLayersForFind = true;
    app.findChangeTextOptions.includeLockedStoriesForFind = true;
    app.findChangeTextOptions.includeMasterPages = true;
    app.findChangeTextOptions.wholeWord = false;

    //Perform search
    var myFoundItems = myDocument.findText();
    if (myFoundItems.length) {
        alert("FOUND!");
        break;
    }

    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

    myDocument.close();
}

不要引用我的话,我实际上并没有运行代码,但这就是想法。

If regular search does not work, try the built in scripting, of which you can use Javascript, Visual Basic Script, or AppleScript to code. I'm going with JS...

I'm no expert, but I found this code snippet from page 101 of InDesignCS5_ScriptingGuide_JS.pdf and modified it a bit:

var folder = new Folder("C:/Path/To/Files");
var files = folder.getFiles('*.indd');

for (var i=0; i<files.length; i++) {
    var file = files[i];  
    open(file):

    var myDocument = app.activeDocument;

    //Clear the find/change text preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

    //Search the document for the string "Important Text".
    app.findTextPreferences.findWhat = "Important Text";

    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = true;
    app.findChangeTextOptions.includeHiddenLayers = true;
    app.findChangeTextOptions.includeLockedLayersForFind = true;
    app.findChangeTextOptions.includeLockedStoriesForFind = true;
    app.findChangeTextOptions.includeMasterPages = true;
    app.findChangeTextOptions.wholeWord = false;

    //Perform search
    var myFoundItems = myDocument.findText();
    if (myFoundItems.length) {
        alert("FOUND!");
        break;
    }

    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

    myDocument.close();
}

Don't quote me on that, I did not actually run the code, but that's the idea.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文