DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: DONE: Sync folders by renaming files  (Read 36,834 times)

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: DONE: Sync folders by renaming files
« Reply #25 on: June 07, 2013, 01:57 AM »
I guess we can get skwire to move the thread to Finished then  ;)
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: DONE: Sync folders by renaming files
« Reply #26 on: June 07, 2013, 01:21 PM »
I guess we can get skwire to move the thread to Finished then  ;)

Done.  Really slick batch file work, too, 4wd.

TaoPhoenix

  • 0 - 60 ... then back to 0 again!
  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • Participated in NANY Challenge Three Times
Re: DONE: Sync folders by renaming files
« Reply #27 on: June 07, 2013, 01:47 PM »

Hmm.

I liked this idea so I decided to give it a try. But I can't get it to work!
I get an error:
"Choice is not recognized as an internal or external command, operable program, or batch file."
What am I missing?

Tested on my slightly infamous Win XP system.
Use attachthumb=# to show an attached image as an expandable thumbnail, or attach=# to show full size. (With Brackets)

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: DONE: Sync folders by renaming files
« Reply #28 on: June 08, 2013, 03:39 AM »
What am I missing?

choice  :)

MS in their infinite wisdom included the choice.com/choice.exe DOS command in all versions of Windows from 3.1 and DOS 6.x onwards except 2000 and XP.

You can grab the choice.com command from a set of DOS 6+ disks - I've attached it below for Windows x86 only.

Also, I'm sorry to say, v9 SHA-1 calculation doesn't work due to the lack of Delayed Expansion, (enabling limits using ! in filenames), so I'm writing a small hash program so I won't have to use fciv.exe which is why I have to use the for loop to get the value I want.
Why they couldn't just output the hash value without any fluff is beyond me.  :-\

So, I should have another v9 up with a separate hash program later today.

Done.  Really slick batch file work, too, 4wd.

Spoke too soon there - give me a couple of hours though  ;)

OK, back with v9.5:
  • No longer requires choice.com, so it should work OK on W2k and XP.
  • Now has a dedicated hash program so the SHA-1 comparison works properly, (put it in the same folder as the batch file).
  • Checks to see if the Source and Destination are the same, it'll exit if they are.
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903
« Last Edit: June 08, 2013, 05:10 AM by 4wd »

Original address: https://www.donationcoder.com/forum/index.php?topic=35086.0