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

Main Area and Open Discussion > General Software Discussion

blanking file data while keeping folder-file structure

(1/5) > >>

Steven Avery:
My Eudora has a couple of hundred files (.mbx and .toc) I would like to clear out the data and keep the structure.

The reason now is funny. When I copied the 50+ gigabytes of data from puter to USB with XYPlorer it glitched out on the leading spaces.  (It sometimes left less spaces in the target usb.) This will mess up the filters.

Now I am 800 miles away and I want to fix the file names on the USB restored files.  If I could clear out the data on the remote source files with a simple script or utiity, I could copy over the structure with Teamviewer.  Then fix the structure by hand.  (Granted I could probably do this remotely, but in a more cumbersome manner.)

Also I could see this having possible additional future uses. e.g. Making a yearly archive of all the email.

Good method to use?


Some general advice:
While spaces are allowed in filenames by any of the filesystems that common operating systems employ, you should resist the urge to use them. Not all file system are as forgiving with the use of spaces and from your description I understand that you use leading spaces in filenames.

Granted, it is visually not as "attractive", but replacing spaces with '.' or '_' is a far better practice. Furthermore, there is the thing that file explorers aren't created equally. And I suspect that the amount of leading spaces will trip up almost all of them. If you think that file managers all use the exact same way to access available file systems, you are dearly mistaken. Even when they do use standardized dll to make those API calls, it isn't always certain that the latest & greatest versions of these are used. Or maybe you are using a (barely) older version of a file manager that didn't have the latest fixes for accessing the file system on your USB device.

If you are dead set on using leading spaces, I would only transfer these using only the bog standard Windows Explorer and nothing else.

Using a different file name structure could help you more than a script. For example: start the name of whatever .mbx file you receive personal mail into with '0.<insert here the amount of spaces you want><name of file>.mbx'. Business related .mbx file names could start with '1.' etc.

By doing something as simple as that, you will make transferring files with whatever file manager much more reliable and prevent the need for scripts and/or manual file name reconstruction in the future.

Adjusting your filters won't be too problematic that way either. I would even go as far as recommending 'Mail store home', which backs up your mail by storing these in a database. Not only allows you to search much more efficiently through huge piles of mail, it also allows you to transfer between file formats and different mail clients very easily.

The freeware version will likely be all you need and you an get it as a portable app too. With that in mind you only need to transfer the Mail store application to you USB device to have super-deluxe access to all of the mail you have put into it. I personally use it in this way with 18GByte of mail.

Steven Avery:
MailStore is a good program, with which I have tinkered a bit. I'm not sure that its search facility is as friendly and strong as Eudora, with the current folder and sub-folder status.

As far as I can tell, Total Commander, my main file manager, works properly with the leading spaces. I just brought XyPlorer into play because of a time crunch.  It messing up the leading spaces was a bit of a surprise.  The puter is Windows 7.

Your advice on avoiding spaces (and especially leading spaces) is good, and noted.  However, it is a longer term solution.  I am trying to have a good one-time fix with what I have now.  That will be most easily handled by blanking out the data bringing over the file structure and making some hand adjustments to the one with data (most of the files do have leading blanks.)


Steven Avery:
The data where the file structure matches the filters is 800 miles away.  If I change the names there (the filters will automatically match and change) in a slightly cumbersome manner with Teamviewer, I can not get the 50GB worth of data over here in any convenient way for a month or so. 

If I bring the structure over to my current computer, I can do the fix fairly simply.

An alternative: If someone knows a way to transport 70GB (more accurate) over the net in a reasonable time affordably, I could use that solution as well.


However, looking for a way to make a copy of a file structure, blanking out the data, seems like a fairly simple routine, in one method it would be 3-step.

Place the name of the file in a variable.
Delete the original
Build a new empty file with the variable name.

So theoretically it could be done with something as easy as a batch file. Or, more elegantly, AutoHotkey. However, I always like a designed tool and avoid PC batch stuff, having been spoiled by the OCL on the System 36.  Should I just try AutoHotKey, or the similar one?


XYplorer dev here: I checked that in XYplorer and indeed when using the standard copy (using the shell copy API) any leading spaces are automatically removed from the copied filenames.

I recommend to enable XYplorer's own "Custom Copy" which does not have this sort of undesired smartness. Or use XYplorer's Backup function which also does not have this problem.

OTOH, I would generally not recommend leading spaces in filenames. Sooner or later they will get you in trouble.



[0] Message Index

[#] Next page

Go to full version