Как установить синхронизируемые напоминания на основе Dropbox?

467
mk117

Я пытаюсь найти способ установить напоминания между моим домашним компьютером и рабочим компьютером. И мне это нужно примерно так:

  1. Я помещаю текстовый файл в dropbox на homepc, и позволяю ему загружаться в dropbox (синхронизируется)
  2. Когда я открываю свой WorkPC, файл загружается на мой компьютер через Dropbox.
  3. Программа на моем рабочем компьютере видит измененный файл в папке dropbox и открывает его.

Таким образом, всякий раз, когда я устанавливаю изменения в этот текстовый файл, программа (homepc или workpc) открывает его при запуске Windows. Это должно происходить только один раз при запуске и должно быть настроено как на домашнем ПК, так и на рабочем ПК?

Это можно сделать с помощью пакетного сценария? Или какое-нибудь бесплатное / портативное (желательно портативное!)

Другой альтернативой может быть то, что он просто копирует измененный текстовый файл из папки Dropbox на рабочий стол. Мой рабочий стол на обоих компьютерах чистый (без каких-либо значков), поэтому любой файл, скопированный на рабочий стол, хорошо виден, и тогда я могу просто увидеть напоминания и удалить скопированный текстовый файл ... Это может быть легко, но я не знаю пакетное программирование ..

Спасибо!

0
Как насчет того, чтобы просто перетащить файл .txt в папку «Автозагрузка» в меню «Пуск»? Der Hochstapler 10 лет назад 0

1 ответ на вопрос

1
bytehead

This should be doable.

It's already possible using Dropbox and torrents using utorrent. You have utorrent check a folder in your Dropbox for torrents, and if it finds one, it loads it and then deletes it (if you want).

I would dedicate a folder for this use. Use login scripts such that when you log in (there really isn't a way of going by startup), it will check the dropbox folder, and then bring it up in the editor of your choice. You may want the script to wait 30 seconds or so to make sure that Dropbox is running and has completely synced.

So a psuedo login script for both computers would look like this.

@echo off wait 60 : seconds, hopefully if exist d:\Dropbox\Reminders\* uedit32 d:\Dropbox\Reminders\* 

This waits one minute and then, if there are files in that directory, use my editor to open up every file that is in that directory

d:\Dropbox\ would be your Dropbox location. Mine is actually d:\dropbox\dropbox (and used to be d:\My Dropbox\Dropbox ...)

Alternatively, I guess:

for %%j in (d:\Dropbox\Reminders\*) do notepad %%j 

would then bring up each individual in the directory. Replace notepad with your editor of choice. My original works with my editor. :p

You would then be responsible for deleting them from the directory.

If you just want to bring up the NEW reminders, put the new reminders in Reminders, and keep the old (still worthwhile reminders) around,

@echo off wait 60 : seconds, hopefully for %%j in (d:\dropbox\reminders\*) do (move %%j d:\dropbox\oldrems & youreditor "d:\dropbox\oldrems\%%~nxj") 

Again, we wait 60 seconds to get dropbox loaded and synced. Then, for every reminder in the new reminder folder, we move it to the old reminders folder (oldrems), and if successful, we then run youreditor on the new file.

The %%~nxj takes the batch variable j and strips it down to just the filename and extension. Otherwise it would render to d:\dropbox\oldrems\d:\dropbox\reminders\whatthefilenameis.ext See FOR /? for more information.

The problem with this is that there could be file name collisions. In which case, move will NOT move the file, and it will be kept there until you remove it, or remove the file collision and log in again, in which case it will then get moved.

Does this help?

EDIT: To open a file with it's default opener, replace youreditor with start ""

@echo off wait 60 : seconds, hopefully for %%j in (d:\dropbox\reminders\*) do (move %%j d:\dropbox\oldrems & start "" "d:\dropbox\oldrems\%%~nxj") 

I always add "" as a title for start, because if you put your file in quotes (which I have done here, just in case the filename contains spaces) it will take the filename as the window name and then complain that there is nothing to open. Alternatively, if you are worried you may get a blank window title, you can just double the "d:\dropbox\oldrems\%%~nxj"

start "d:\dropbox\oldrems\%%~nxj" "d:\dropbox\oldrems\%%~nxj" 

Which would then give you the name of the file for the window title.

Windows 95/98(/ME?) used start.exe (start in Win NT and above is embedded in CMD.EXE), and it never suffered this problem (and exists in my library as st.exe ;) )

Technically, just

"d:\dropbox\oldrems\%%~nxj" 

should work. But not always. start "" "d:\dropbox\oldrems\%%~nxj" always does.

This will start all executable programs, so if you just want to have a .CMD file for further editing, you will have to change the extension, otherwise it will actually execute the .CMD file. Same with .BAT, .COM, .EXE, .PS1, .VBS and any other extensions. You have been warned.

Один вопрос: вместо того, чтобы просить открыть файл в вашем редакторе, который является блокнотом для текста и фотошопом для psd ... можно ли изменить этот скрипт, чтобы он просто открывал файлы независимо от предпочтений программы? Например, если я сохраню три файла, txt, jpg и psd, то команда «открыть» сможет открыть эти файлы только в их программах по умолчанию? mk117 10 лет назад 0
Надеюсь, моя редакция покажет вам способ сделать то, что вы хотите. bytehead 10 лет назад 0

Похожие вопросы