EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Dir2Dat - Empty folders management  (Read 2914 times)

steforom

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 76.0 Firefox 76.0
    • View Profile
Dir2Dat - Empty folders management
« on: 12 May 2020, 10:45 »

Dear all,

I want create DATfile to check extracted files & folders from ISO images.

So I proceed to extraction, make a 7z compression of everything extracted and start Dir2Dat.

Everything is OK except when there are empty folders on the ISO. These empty folders are OK in the 7z file but they don't appear in the DATfile created based on the 7z file.

I checked "Add 0-file for empty folder" but no changes wether checked or not.

Is it possible to take into account these empty folders in a DATfile ? and then avoid error message when checking file with ClrMamePro.

Thanks by advance for your help.
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 81.0.4044.138 Chrome 81.0.4044.138
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #1 on: 12 May 2020, 10:54 »

When you use the "add 0-file for empty folder " option you will get an entry like this in the produced datfile:

<machine name="neuer ordner">
<description>myemptyfolder</description>
<rom name="_" size="0" crc="-"/>
</machine>

meaning, your empty folder ("myemptyfolder") is added as a set and contains a rom named "_" with zero size.
On your filesystem it will correspond to a folder within your set rompath named "myemptyfolder" and you need to put in there a dummy file "_" of 0 size.

So...double check your created datfile and look out for rom name="_"
Logged

steforom

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 76.0 Firefox 76.0
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #2 on: 12 May 2020, 11:14 »

Thank for your answer but it doesn't solve my issue. Maybe I was not so clear in my first post.

For example, I have folder containing :
  - 1 folder : "Empty Folder"
  - 1 file : "Test.txt"

By following what your answered, my DATfile is :

   <machine name="Default">
      <description>Default</description>
      <rom name="File.txt" size="8666" crc="e32d2a07"/>
   </machine>
   <machine name="Empty Folder">
      <description>Empty Folder</description>
      <rom name="_" size="0" crc="-"/>
   </machine>

In this case, I can see the empty folder.

What I want is to have the content of my folder compressed in a ZIP or 7Z file. Everything is on the compressed file (see picture joined) but after launching Dir2Dat, the empty folder is not on the DATfile :

   <machine name="Test">
      <description>Test</description>
      <rom name="File.txt" size="8666" crc="e32d2a07"/>
   </machine>

Regards.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 81.0.4044.138 Chrome 81.0.4044.138
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #3 on: 12 May 2020, 11:37 »

sorry...but I don't get it....

So you've created a datfile where the dummy entry for the empty folder is in.
....and you got a 7z archive where the empty folder is in...

and then you use dir2dat again? Or the scanner? or....

don't forget, you NEED a dummy file placed in the "empty" folder.
« Last Edit: 12 May 2020, 11:45 by Roman »
Logged

steforom

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 76.0 Firefox 76.0
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #4 on: 12 May 2020, 12:21 »

I created a folder named "Test" containing :
  - 1 empty folder called "Empty Folder" ... I confirmed without any file in it
  - 1 file called "Test.txt"

Then I used Dir2Dat on the folder "Test" and get :

   <machine name="Test">
      <description>Test</description>
      <rom name="File.txt" size="8666" crc="e32d2a07"/>
   </machine>
   <machine name="Empty Folder">
      <description>Empty Folder</description>
      <rom name="_" size="0" crc="-"/>
   </machine>

The empty folder and the file "_" appear as you explained me in your first post.

What I really want is to work with compressed files containing the whole extracted structure of ISO so I then compressed the content of "Test" folder in a ZIP file. As shown in the picture in previous post, the ZIP contains only 1 folder (still empty) and 1 file.

I then apply Dir2Dat on directory where this ZIP file is stored and get this :

   <machine name="Test">
      <description>Test</description>
      <rom name="File.txt" size="8666" crc="e32d2a07"/>
   </machine>

If I use the scanner with this DAT on the ZIPfile, I get an error saying that the empty folder is unneeded.

I join a ZIP file example in case you want to test.

---

When you say that I need to put a dummy file in the folder, do I need to give this file a specific name ?

Regards.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 112
  • Offline Offline
  • Posts: 3287
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 81.0.4044.138 Chrome 81.0.4044.138
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #5 on: 12 May 2020, 12:41 »

Ok, now I got it.
The "add 0-file for empty folder" option only works on decompressed files/folders (I may add it for compressed ones in the future). So it's clear that when running dir2dat a second time on an archive, you won't get the dummy entry anymore.
And of course if you scan your sets with that datfile, the folder gets removed (since it's not mentioned in the dat).

As I said, you need the dummy file "_" as a placeholder in your empty folder to make it work. So in general, there are no real empty folders.
« Last Edit: 12 May 2020, 12:41 by Roman »
Logged

steforom

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 76.0 Firefox 76.0
    • View Profile
Re: Dir2Dat - Empty folders management
« Reply #6 on: 12 May 2020, 12:47 »

Thank you.
Logged
Pages: [1]   Go Up
 

Page created in 0.16 seconds with 20 queries.

anything
anything