ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Replace existing file with zero byte version with slight name change

(1/3) > >>

magician62:
I have in multiple directories on a drive with files I once created as placeholders for later replacement with the correct file, and also reserving physical drive space.

They are identified in the name by " [PLACEHOLDER]"

What I am trying to do is bring all these files down to Zero Byte.

Then change the file type whatever it may be to ".placeholder"

Then remove " [PLACEHOLDER]" from the filename
 

An all in one solution would be great, but I can achieve the last two with Bulk Rename Utility in a couple of passes, so not a major issue.

Any thoughts.

Ath:
Why would you want to create filenames in advance if they differ from the filename to be used eventually?

OT: Reserving space for future filecontent won't work using 0-byte files, as no actual diskspace is claimed by those files, only a directory-entry. Write at least 1 byte and a single cluster (4 KB on most systems) is used.

skwire:
I have in multiple directories on a drive with files I once created as placeholders for later replacement with the correct file, and also reserving physical drive space.

They are identified in the name by " [PLACEHOLDER]"

What I am trying to do is bring all these files down to Zero Byte.

Then change the file type whatever it may be to ".placeholder"

Then remove " [PLACEHOLDER]" from the filename
 

An all in one solution would be great, but I can achieve the last two with Bulk Rename Utility in a couple of passes, so not a major issue.

Any thoughts.
-magician62 (December 26, 2015, 11:38 AM)
--- End quote ---

To confirm:

1) You have files like with "[PLACEHOLDER]" somewhere in the name, e.g., myfile [PLACEHOLDER].ext
2) These files currently occupy some amount of space, i.e., they're non-zero byte files.
3) Assuming the filename in #1, you want it to be: myfile.placeholder
4) You then want this new file to be zero-byte.  Basically, create myfile.placeholder as zero-byte and, if successful, delete the original myfile [PLACEHOLDER].ext

Correct?

skwire:
Why would you want to create filenames in advance if they differ from the filename to be used eventually?-Ath (December 26, 2015, 12:27 PM)
--- End quote ---

It sounds like his current files DO reserve space (probably with random file data...doesn't matter how, really) and he wants to reclaim the space, but still keep a record, by making the new placeholder file (with a slightly different name) zero-byte.

magician62:
Hi Jody, the current format is " [PLACEHOLDER].ext" so always immediately before the extension and in the square brackets. .placeholder will be the new extension, so I can filter on that in future.

As mentioned though I can do the rename elsewhere quite easy. Getting the zero byte files is the hard bit. I can even drag drop them in bulk to a util that replaces the file with zero byte


Ath

The reason for creating files in advance gave the ability to see what is missing, using PLACEHOLDER provided a simple, and filterable visual aid to identify those files, which may have been of different length to allow for the expected file size.

I don't expect a zero byte file to reserve drive space. The methodology has changed with falling storage costs and there is now at least 100Gb reserved space on the drive should the missing files, though unlikely, appear.

Navigation

[0] Message Index

[#] Next page

Go to full version